]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/turret/plasma_dual.qc
Purge self from FireRailgunBullet
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / turret / plasma_dual.qc
index e1143bc04803ea6877599567d76ad94e97e3ffcb..6f712b370db2c101cf568ad35683ff76e83b6e94 100644 (file)
@@ -1,9 +1,11 @@
 #ifndef TURRET_PLASMA_DUAL_H
 #define TURRET_PLASMA_DUAL_H
 
+#include "plasma_weapon.qh"
+
 CLASS(PlasmaDualAttack, PlasmaAttack)
 /* refname   */ ATTRIB(PlasmaDualAttack, netname, string, "turret_plasma_dual");
-/* wepname   */ ATTRIB(PlasmaDualAttack, message, string, _("Dual plasma"));
+/* wepname   */ ATTRIB(PlasmaDualAttack, m_name, string, _("Dual plasma"));
 ENDCLASS(PlasmaDualAttack)
 REGISTER_WEAPON(PLASMA_DUAL, NEW(PlasmaDualAttack));
 
@@ -12,8 +14,8 @@ CLASS(DualPlasmaTurret, PlasmaTurret)
 /* mins       */ ATTRIB(DualPlasmaTurret, mins, vector, '-32 -32 0');
 /* maxs       */ ATTRIB(DualPlasmaTurret, maxs, vector, '32 32 64');
 /* modelname  */ ATTRIB(DualPlasmaTurret, mdl, string, "base.md3");
-/* model      */ ATTRIB(DualPlasmaTurret, model, string, strzone(strcat("models/turrets/", this.mdl)));
-/* head_model */ ATTRIB(DualPlasmaTurret, head_model, string, strzone(strcat("models/turrets/", "plasmad.md3")));
+/* model      */ ATTRIB_STRZONE(DualPlasmaTurret, model, string, strcat("models/turrets/", this.mdl));
+/* head_model */ ATTRIB_STRZONE(DualPlasmaTurret, head_model, string, strcat("models/turrets/", "plasmad.md3"));
 /* netname    */ ATTRIB(DualPlasmaTurret, netname, string, "plasma_dual");
 /* fullname   */ ATTRIB(DualPlasmaTurret, turret_name, string, _("Dual Plasma Cannon"));
     ATTRIB(DualPlasmaTurret, m_weapon, Weapon, WEP_PLASMA_DUAL);
@@ -28,11 +30,12 @@ REGISTER_TURRET(PLASMA_DUAL, NEW(DualPlasmaTurret));
 
 spawnfunc(turret_plasma_dual) { if (!turret_initialize(TUR_PLASMA_DUAL)) remove(self); }
 
-METHOD(DualPlasmaTurret, tr_attack, void(DualPlasmaTurret this))
+METHOD(DualPlasmaTurret, tr_attack, void(DualPlasmaTurret thistur, entity it))
 {
+    SELFPARAM();
     if (g_instagib) {
-        FireRailgunBullet (self.tur_shotorg, self.tur_shotorg + self.tur_shotdir_updated * MAX_SHOT_DISTANCE, 10000000000,
-                           800, 0, 0, 0, 0, DEATH_TURRET_PLASMA);
+        FireRailgunBullet (self, self.tur_shotorg, self.tur_shotorg + self.tur_shotdir_updated * MAX_SHOT_DISTANCE, 10000000000,
+                           800, 0, 0, 0, 0, DEATH_TURRET_PLASMA.m_id);
 
 
         Send_Effect(EFFECT_VORTEX_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
@@ -41,12 +44,13 @@ METHOD(DualPlasmaTurret, tr_attack, void(DualPlasmaTurret this))
         vector v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
         WarpZone_TrailParticles(world, particleeffectnum(EFFECT_VAPORIZER(self.team)), self.tur_shotorg, v);
     } else {
-        super.vtblbase.tr_attack(this);
+        SUPER(PlasmaTurret).tr_attack(thistur, it);
     }
     self.tur_head.frame += 1;
 }
-METHOD(DualPlasmaTurret, tr_think, void(DualPlasmaTurret thistur))
+METHOD(DualPlasmaTurret, tr_think, void(DualPlasmaTurret thistur, entity it))
 {
+    SELFPARAM();
     if ((self.tur_head.frame != 0) && (self.tur_head.frame != 3))
         self.tur_head.frame = self.tur_head.frame + 1;