X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fturrets%2Funit%2Fplasma_dual.qc;h=e1e2f1ad94fcd11fb120ff0ad9bf0258432ec119;hp=58424781076c62c779058df43d9a6617f8d3ffff;hb=c3f6bc06517a43e4de33d2a9148cdb36dbfc2ab8;hpb=04bbc270623d9f75f19d00c93b6f5b2c51734bf4 diff --git a/qcsrc/common/turrets/unit/plasma_dual.qc b/qcsrc/common/turrets/unit/plasma_dual.qc index 5842478107..e1e2f1ad94 100644 --- a/qcsrc/common/turrets/unit/plasma_dual.qc +++ b/qcsrc/common/turrets/unit/plasma_dual.qc @@ -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;