Exemple #1
0
 public static void Monster_fire_blaster(edict_t self, float[] start, float[] dir, int damage, int speed, int flashtype, int effect)
 {
     GameWeapon.Fire_blaster(self, start, dir, damage, speed, effect, false);
     GameBase.gi.WriteByte(Defines.svc_muzzleflash2);
     GameBase.gi.WriteShort(self.index);
     GameBase.gi.WriteByte(flashtype);
     GameBase.gi.Multicast(start, Defines.MULTICAST_PVS);
 }
Exemple #2
0
 public static void Monster_fire_bfg(edict_t self, float[] start, float[] aimdir, int damage, int speed, int kick, float damage_radius, int flashtype)
 {
     GameWeapon.Fire_bfg(self, start, aimdir, damage, speed, damage_radius);
     GameBase.gi.WriteByte(Defines.svc_muzzleflash2);
     GameBase.gi.WriteShort(self.index);
     GameBase.gi.WriteByte(flashtype);
     GameBase.gi.Multicast(start, Defines.MULTICAST_PVS);
 }
Exemple #3
0
 public static void Monster_fire_shotgun(edict_t self, float[] start, float[] aimdir, int damage, int kick, int hspread, int vspread, int count, int flashtype)
 {
     GameWeapon.Fire_shotgun(self, start, aimdir, damage, kick, hspread, vspread, count, Defines.MOD_UNKNOWN);
     GameBase.gi.WriteByte(Defines.svc_muzzleflash2);
     GameBase.gi.WriteShort(self.index);
     GameBase.gi.WriteByte(flashtype);
     GameBase.gi.Multicast(start, Defines.MULTICAST_PVS);
 }
Exemple #4
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);
        }
Exemple #5
0
            public override void Use(edict_t self, edict_t other, edict_t activator)
            {
                Int32 effect;

                if ((self.spawnflags & 2) != 0)
                {
                    effect = 0;
                }
                else if ((self.spawnflags & 1) != 0)
                {
                    effect = Defines.EF_HYPERBLASTER;
                }
                else
                {
                    effect = Defines.EF_BLASTER;
                }
                GameWeapon.Fire_blaster(self, self.s.origin, self.movedir, self.dmg, ( Int32 )self.speed, Defines.EF_BLASTER, Defines.MOD_TARGET_BLASTER != 0);
                GameBase.gi.Sound(self, Defines.CHAN_VOICE, self.noise_index, 1, Defines.ATTN_NORM, 0);
            }