1 #ifndef TURRET_PLASMA_DUAL_H
2 #define TURRET_PLASMA_DUAL_H
4 CLASS(PlasmaDualAttack, PlasmaAttack)
5 /* refname */ ATTRIB(PlasmaDualAttack, netname, string, "turret_plasma_dual");
6 /* wepname */ ATTRIB(PlasmaDualAttack, message, string, _("Dual plasma"));
7 ENDCLASS(PlasmaDualAttack)
8 REGISTER_WEAPON(PLASMA_DUAL, NEW(PlasmaDualAttack));
10 CLASS(DualPlasmaTurret, PlasmaTurret)
11 /* spawnflags */ ATTRIB(DualPlasmaTurret, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_MEDPROJ | TUR_FLAG_PLAYER);
12 /* mins */ ATTRIB(DualPlasmaTurret, mins, vector, '-32 -32 0');
13 /* maxs */ ATTRIB(DualPlasmaTurret, maxs, vector, '32 32 64');
14 /* modelname */ ATTRIB(DualPlasmaTurret, mdl, string, "base.md3");
15 /* model */ ATTRIB(DualPlasmaTurret, model, string, strzone(strcat("models/turrets/", this.mdl)));
16 /* head_model */ ATTRIB(DualPlasmaTurret, head_model, string, strzone(strcat("models/turrets/", "plasmad.md3")));
17 /* netname */ ATTRIB(DualPlasmaTurret, netname, string, "plasma_dual");
18 /* fullname */ ATTRIB(DualPlasmaTurret, turret_name, string, _("Dual Plasma Cannon"));
19 ATTRIB(DualPlasmaTurret, m_weapon, Weapon, WEP_PLASMA_DUAL);
20 ENDCLASS(DualPlasmaTurret)
21 REGISTER_TURRET(PLASMA_DUAL, NEW(DualPlasmaTurret));
29 void spawnfunc_turret_plasma_dual() { SELFPARAM(); if (!turret_initialize(TUR_PLASMA_DUAL)) remove(self); }
31 METHOD(DualPlasmaTurret, tr_attack, void(DualPlasmaTurret this))
34 FireRailgunBullet (self.tur_shotorg, self.tur_shotorg + self.tur_shotdir_updated * MAX_SHOT_DISTANCE, 10000000000,
35 800, 0, 0, 0, 0, DEATH_TURRET_PLASMA);
38 Send_Effect(EFFECT_VORTEX_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
40 // teamcolor / hit beam effect
41 vector v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
42 WarpZone_TrailParticles(world, particleeffectnum(EFFECT_VAPORIZER(self.team)), self.tur_shotorg, v);
44 super.vtblbase.tr_attack(this);
46 self.tur_head.frame += 1;
48 METHOD(DualPlasmaTurret, tr_think, void(DualPlasmaTurret thistur))
50 if ((self.tur_head.frame != 0) && (self.tur_head.frame != 3))
51 self.tur_head.frame = self.tur_head.frame + 1;
53 if (self.tur_head.frame > 6)
54 self.tur_head.frame = 0;