]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/unit/plasma_dual.qc
Merge branch 'master' into TimePath/spawnfunc
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / unit / plasma_dual.qc
index 6469c0591d3d1a16d1fdb769f2479e86b82b3252..edcf7ed21fd4c75ff6bda5c676617b4e56d04fd7 100644 (file)
@@ -1,4 +1,4 @@
-#ifdef REGISTER_TURRET
+#ifndef IMPLEMENTATION
 REGISTER_TURRET(
 /* TUR_##id   */ PLASMA_DUAL,
 /* function   */ t_plasma_dual,
@@ -11,7 +11,7 @@ REGISTER_TURRET(
 );
 #else
 #ifdef SVQC
-spawnfunc(turret_plasma_dual) { if(!turret_initialize(TUR_PLASMA_DUAL)) remove(self); }
+spawnfunc(turret_plasma_dual) { if(!turret_initialize(TUR_PLASMA_DUAL.m_id)) remove(self); }
 
 float t_plasma_dual(float req)
 {SELFPARAM();
@@ -31,18 +31,13 @@ float t_plasma_dual(float req)
                 Send_Effect(EFFECT_VORTEX_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
 
                 // teamcolor / hit beam effect
-                vector v;
-                string s;
-                v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
-                s = strcat(EFFECT_VAPORIZER_NEUTRAL.eent_eff_name, ((self.team) ? Static_Team_ColorName_Upper(self.team) : ""));
-
-                WarpZone_TrailParticles(world, _particleeffectnum(s), self.tur_shotorg, v);
-
+                vector v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
+                WarpZone_TrailParticles(world, particleeffectnum(EFFECT_VAPORIZER(self.team)), self.tur_shotorg, v);
                 self.tur_head.frame += 1;
             }
             else
             {
-                entity missile = turret_projectile(W_Sound("hagar_fire"), 1, 0, DEATH_TURRET_PLASMA, PROJECTILE_ELECTRO_BEAM, TRUE, TRUE);
+                entity missile = turret_projectile(SND(HAGAR_FIRE), 1, 0, DEATH_TURRET_PLASMA, PROJECTILE_ELECTRO_BEAM, TRUE, TRUE);
                 missile.missile_flags = MIF_SPLASH;
                 Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
                 self.tur_head.frame += 1;