Beispiel #1
0
 public static void Monster_fire_rocket(edict_t self, float[] start, float[] dir, int damage, int speed, int flashtype)
 {
     GameWeapon.Fire_rocket(self, start, dir, damage, speed, damage + 20, damage);
     GameBase.gi.WriteByte(Defines.svc_muzzleflash2);
     GameBase.gi.WriteShort(self.index);
     GameBase.gi.WriteByte(flashtype);
     GameBase.gi.Multicast(start, Defines.MULTICAST_PVS);
 }
Beispiel #2
0
        public static void Turret_breach_fire(edict_t self)
        {
            float[] f     = new float[] { 0, 0, 0 }, r = new float[] { 0, 0, 0 }, u = new float[] { 0, 0, 0 };
            float[] start = new float[] { 0, 0, 0 };
            int     damage;
            int     speed;

            Math3D.AngleVectors(self.s.angles, f, r, u);
            Math3D.VectorMA(self.s.origin, self.move_origin[0], f, start);
            Math3D.VectorMA(start, self.move_origin[1], r, start);
            Math3D.VectorMA(start, self.move_origin[2], u, start);
            damage = (int)(100 + Lib.Random() * 50);
            speed  = (int)(550 + 50 * GameBase.skill.value);
            GameWeapon.Fire_rocket(self.teammaster.owner, start, f, damage, speed, 150, damage);
            GameBase.gi.Positioned_sound(start, self, Defines.CHAN_WEAPON, GameBase.gi.Soundindex("weapons/rocklf1a.wav"), 1, Defines.ATTN_NORM, 0);
        }