]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/turret/plasma.qc
Purge self from FireRailgunBullet
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / turret / plasma.qc
index c36423381d49bd7940220c2f909bd24e5c99f678..a70e13756ce1d708ae024cf4d4a32dfa18565e45 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef TURRET_PLASMA_H
 #define TURRET_PLASMA_H
 
-#include "plasma_weapon.qc"
+#include "plasma_weapon.qh"
 
 CLASS(PlasmaTurret, Turret)
 /* spawnflags */ ATTRIB(PlasmaTurret, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_MEDPROJ | TUR_FLAG_PLAYER);
@@ -20,17 +20,15 @@ REGISTER_TURRET(PLASMA, NEW(PlasmaTurret));
 
 #ifdef IMPLEMENTATION
 
-#include "plasma_weapon.qc"
-
 #ifdef SVQC
 
 spawnfunc(turret_plasma) { if (!turret_initialize(TUR_PLASMA)) remove(self); }
 
-METHOD(PlasmaTurret, tr_attack, void(PlasmaTurret this))
+METHOD(PlasmaTurret, tr_attack, void(PlasmaTurret this, entity it))
 {
     if(g_instagib)
     {
-        FireRailgunBullet (self.tur_shotorg, self.tur_shotorg + self.tur_shotdir_updated * MAX_SHOT_DISTANCE, 10000000000,
+        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,13 +39,14 @@ METHOD(PlasmaTurret, tr_attack, void(PlasmaTurret this))
     }
     else
     {
-        SUPER(PlasmaTurret).tr_attack(this);
+        SUPER(PlasmaTurret).tr_attack(this, it);
     }
     if (self.tur_head.frame == 0)
         self.tur_head.frame = 1;
 }
-METHOD(PlasmaTurret, tr_think, void(PlasmaTurret thistur))
+METHOD(PlasmaTurret, tr_think, void(PlasmaTurret thistur, entity it))
 {
+    SELFPARAM();
     if (self.tur_head.frame != 0)
         self.tur_head.frame = self.tur_head.frame + 1;