1 #ifndef TURRET_PLASMA_DUAL_H
2 #define TURRET_PLASMA_DUAL_H
4 #include "plasma_weapon.qh"
6 CLASS(PlasmaDualAttack, PlasmaAttack)
7 /* refname */ ATTRIB(PlasmaDualAttack, netname, string, "turret_plasma_dual");
8 /* wepname */ ATTRIB(PlasmaDualAttack, m_name, string, _("Dual plasma"));
9 ENDCLASS(PlasmaDualAttack)
10 REGISTER_WEAPON(PLASMA_DUAL, NEW(PlasmaDualAttack));
12 CLASS(DualPlasmaTurret, PlasmaTurret)
13 /* spawnflags */ ATTRIB(DualPlasmaTurret, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_MEDPROJ | TUR_FLAG_PLAYER);
14 /* mins */ ATTRIB(DualPlasmaTurret, mins, vector, '-32 -32 0');
15 /* maxs */ ATTRIB(DualPlasmaTurret, maxs, vector, '32 32 64');
16 /* modelname */ ATTRIB(DualPlasmaTurret, mdl, string, "base.md3");
17 /* model */ ATTRIB_STRZONE(DualPlasmaTurret, model, string, strcat("models/turrets/", this.mdl));
18 /* head_model */ ATTRIB_STRZONE(DualPlasmaTurret, head_model, string, strcat("models/turrets/", "plasmad.md3"));
19 /* netname */ ATTRIB(DualPlasmaTurret, netname, string, "plasma_dual");
20 /* fullname */ ATTRIB(DualPlasmaTurret, turret_name, string, _("Dual Plasma Cannon"));
21 ATTRIB(DualPlasmaTurret, m_weapon, Weapon, WEP_PLASMA_DUAL);
22 ENDCLASS(DualPlasmaTurret)
23 REGISTER_TURRET(PLASMA_DUAL, NEW(DualPlasmaTurret));
31 spawnfunc(turret_plasma_dual) { if (!turret_initialize(this, TUR_PLASMA_DUAL)) remove(this); }
33 METHOD(DualPlasmaTurret, tr_attack, void(DualPlasmaTurret thistur, entity it))
37 FireRailgunBullet (self, self.tur_shotorg, self.tur_shotorg + self.tur_shotdir_updated * MAX_SHOT_DISTANCE, 10000000000,
38 800, 0, 0, 0, 0, DEATH_TURRET_PLASMA.m_id);
41 Send_Effect(EFFECT_VORTEX_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
43 // teamcolor / hit beam effect
44 vector v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
45 WarpZone_TrailParticles(world, particleeffectnum(EFFECT_VAPORIZER(self.team)), self.tur_shotorg, v);
47 SUPER(PlasmaTurret).tr_attack(thistur, it);
49 self.tur_head.frame += 1;
51 METHOD(DualPlasmaTurret, tr_think, void(DualPlasmaTurret thistur, entity it))
53 if ((it.tur_head.frame != 0) && (it.tur_head.frame != 3))
54 it.tur_head.frame = it.tur_head.frame + 1;
56 if (it.tur_head.frame > 6)
57 it.tur_head.frame = 0;