]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/unit/plasma.qc
Use the sound list
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / unit / plasma.qc
index da86d3bf77339811bc007caa3186eb854c7abcf7..38a7eeacb6f85c001359247d49b2baffce28b095 100644 (file)
@@ -11,10 +11,10 @@ REGISTER_TURRET(
 );
 #else
 #ifdef SVQC
-void spawnfunc_turret_plasma() { if(!turret_initialize(TUR_PLASMA)) remove(self); }
+void spawnfunc_turret_plasma() { SELFPARAM(); if(!turret_initialize(TUR_PLASMA)) remove(self); }
 
 float t_plasma(float req)
-{
+{SELFPARAM();
     switch(req)
     {
         case TR_ATTACK:
@@ -27,7 +27,7 @@ float t_plasma(float req)
                 FireRailgunBullet (self.tur_shotorg, self.tur_shotorg + self.tur_shotdir_updated * MAX_SHOT_DISTANCE, 10000000000,
                                    800, 0, 0, 0, 0, DEATH_TURRET_PLASMA);
 
-                Send_Effect("nex_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+                Send_Effect(EFFECT_VORTEX_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
 
                 // teamcolor / hit beam effect
                 vector v;
@@ -35,17 +35,17 @@ float t_plasma(float req)
                 v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
                 s = strcat("TE_TEI_G3", ((self.team) ? Static_Team_ColorName_Upper(self.team) : ""));
 
-                WarpZone_TrailParticles(world, particleeffectnum(s), self.tur_shotorg, v);
+                WarpZone_TrailParticles(world, _particleeffectnum(s), self.tur_shotorg, v);
 
                 if (self.tur_head.frame == 0)
                     self.tur_head.frame = 1;
             }
             else
             {
-                entity missile = turret_projectile("weapons/hagar_fire.wav", 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("laser_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+                Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
                 if (self.tur_head.frame == 0)
                     self.tur_head.frame = 1;
             }
@@ -79,8 +79,6 @@ float t_plasma(float req)
         }
         case TR_PRECACHE:
         {
-            precache_model ("models/turrets/base.md3");
-            precache_model ("models/turrets/plasma.md3");
             return true;
         }
     }