]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/turret/plasma_dual.qc
s/world/NULL/
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / turret / plasma_dual.qc
index 55226bd864d47f87d92c9caa3fa819bb6b5a7cc9..86df15059bfc136ae83102ac93ed6cae39dbcbc1 100644 (file)
@@ -28,34 +28,32 @@ REGISTER_TURRET(PLASMA_DUAL, NEW(DualPlasmaTurret));
 
 #ifdef SVQC
 
-spawnfunc(turret_plasma_dual) { if (!turret_initialize(TUR_PLASMA_DUAL)) remove(self); }
+spawnfunc(turret_plasma_dual) { if (!turret_initialize(this, TUR_PLASMA_DUAL)) remove(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,
+        FireRailgunBullet (it, it.tur_shotorg, it.tur_shotorg + it.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);
+        Send_Effect(EFFECT_VORTEX_MUZZLEFLASH, it.tur_shotorg, it.tur_shotdir_updated * 1000, 1);
 
         // teamcolor / hit beam effect
         vector v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
-        WarpZone_TrailParticles(world, particleeffectnum(EFFECT_VAPORIZER(self.team)), self.tur_shotorg, v);
+        WarpZone_TrailParticles(NULL, particleeffectnum(EFFECT_VAPORIZER(it.team)), it.tur_shotorg, v);
     } else {
         SUPER(PlasmaTurret).tr_attack(thistur, it);
     }
-    self.tur_head.frame += 1;
+    it.tur_head.frame += 1;
 }
 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;
+    if ((it.tur_head.frame != 0) && (it.tur_head.frame != 3))
+        it.tur_head.frame = it.tur_head.frame + 1;
 
-    if (self.tur_head.frame > 6)
-        self.tur_head.frame = 0;
+    if (it.tur_head.frame > 6)
+        it.tur_head.frame = 0;
 }
 
 #endif