]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/turret/phaser.qc
spawnfunc and SendEntity3 have a 'this' parameter, use it
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / turret / phaser.qc
index edfa88f521c867870b38fabf4f915d2afc6bfa09..7675bc41e9adc6c33954ec0d178a0880728788f1 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef TURRET_PHASER_H
 #define TURRET_PHASER_H
 
-#include "phaser_weapon.qc"
+#include "phaser_weapon.qh"
 
 CLASS(PhaserTurret, Turret)
 /* spawnflags */ ATTRIB(PhaserTurret, spawnflags, int, TUR_FLAG_SNIPER | TUR_FLAG_HITSCAN | TUR_FLAG_PLAYER);
@@ -20,14 +20,15 @@ REGISTER_TURRET(PHASER, NEW(PhaserTurret));
 
 #ifdef IMPLEMENTATION
 
-#include "phaser_weapon.qc"
-
 #ifdef SVQC
 
-spawnfunc(turret_phaser) { if (!turret_initialize(TUR_PHASER)) remove(self); }
+spawnfunc(turret_phaser) { if (!turret_initialize(TUR_PHASER)) remove(this); }
+
+.int fireflag;
 
 METHOD(PhaserTurret, tr_think, void(PhaserTurret thistur, entity it))
 {
+    SELFPARAM();
     if (self.tur_head.frame != 0)
     {
         if (self.fireflag == 1)