Merge branch 'master' into Mario/turrets
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / unit / plasma_dual.qc
index 5842478..e1e2f1a 100644 (file)
@@ -9,17 +9,9 @@ REGISTER_TURRET(
 /* netname       */ "plasma_dual",
 /* fullname   */ _("Dual Plasma Cannon")
 );
-
-#define PLASMA_DUAL_SETTINGS(turret) 
-
-
-#ifdef SVQC
-PLASMA_DUAL_SETTINGS(plasma_dual)
-#endif // SVQC
 #else
 #ifdef SVQC
-
-void spawnfunc_turret_plasma_dual() { if not(turret_initialize(TUR_PLASMA_DUAL)) remove(self); }
+void spawnfunc_turret_plasma_dual() { if(!turret_initialize(TUR_PLASMA_DUAL)) remove(self); }
 
 float t_plasma_dual(float req)
 {
@@ -40,27 +32,11 @@ float t_plasma_dual(float req)
 
                                // teamcolor / hit beam effect
                                vector v;
+                               string s;
                                v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
-                               if(teamplay)
-                               {
-                                       switch(self.team)
-                                       {
-                                               case NUM_TEAM_1:   // Red
-                                                               WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3RED"), self.tur_shotorg, v);
-                                                       break;
-                                               case NUM_TEAM_2:   // Blue
-                                                               WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3BLUE"), self.tur_shotorg, v);
-                                                       break;
-                                               case NUM_TEAM_3:   // Yellow
-                                                               WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3YELLOW"), self.tur_shotorg, v);
-                                                       break;
-                                               case NUM_TEAM_4:   // Pink
-                                                               WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3PINK"), self.tur_shotorg, v);
-                                                       break;
-                                       }
-                               }
-                               else
-                                       WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3"), self.tur_shotorg, v);
+                               s = strcat("TE_TEI_G3", Static_Team_ColorName_Upper(self.team));
+                               
+                               WarpZone_TrailParticles(world, particleeffectnum(s), self.tur_shotorg, v);
                                        
                                self.tur_head.frame += 1;
                        }
@@ -105,11 +81,6 @@ float t_plasma_dual(float req)
                        precache_model ("models/turrets/plasmad.md3");
                        return TRUE;
                }
-               case TR_CONFIG:
-               {
-                       TUR_CONFIG_SETTINGS(PLASMA_DUAL_SETTINGS(plasma_dual))
-                       return TRUE;
-               }
        }
 
        return TRUE;