/** The Moster fires the rocket. */ 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); }
/** * QUAKED turret_breach (0 0 0) ? This portion of the turret can change both * pitch and yaw. The model should be made with a flat pitch. It (and the * associated base) need to be oriented towards 0. Use "angle" to set the * starting angle. * * "speed" default 50 "dmg" default 10 "angle" point this forward "target" * point this at an info_notnull at the muzzle tip "minpitch" min acceptable * pitch angle : default -30 "maxpitch" max acceptable pitch angle : default * 30 "minyaw" min acceptable yaw angle : default 0 "maxyaw" max acceptable * yaw angle : default 360 */ public static void turret_breach_fire(edict_t self) { float[] f = { 0, 0, 0 }, r = { 0, 0, 0 }, u = { 0, 0, 0 }; float[] start = { 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); }