]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/turret/plasma.qc
Clean up some of the turret code's self uses
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / turret / plasma.qc
index 97f5c5659721767a2c08a9e54d2ef5eade95949a..84496435634e0cf653e56ea4702ca6eb876bdb27 100644 (file)
@@ -22,7 +22,7 @@ REGISTER_TURRET(PLASMA, NEW(PlasmaTurret));
 
 #ifdef SVQC
 
-spawnfunc(turret_plasma) { if (!turret_initialize(TUR_PLASMA)) remove(this); }
+spawnfunc(turret_plasma) { if (!turret_initialize(this, TUR_PLASMA)) remove(this); }
 
 METHOD(PlasmaTurret, tr_attack, void(PlasmaTurret this, entity it))
 {
@@ -46,12 +46,11 @@ METHOD(PlasmaTurret, tr_attack, void(PlasmaTurret this, entity it))
 }
 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;
+    if (it.tur_head.frame != 0)
+        it.tur_head.frame = it.tur_head.frame + 1;
 
-    if (self.tur_head.frame > 5)
-        self.tur_head.frame = 0;
+    if (it.tur_head.frame > 5)
+        it.tur_head.frame = 0;
 }
 METHOD(PlasmaTurret, tr_setup, void(PlasmaTurret this, entity it))
 {