EFFECT(0, VORTEX_MUZZLEFLASH, "nex_muzzleflash")
EFFECT(1, VAPORIZER_RED, "TE_TEI_G3RED")
-EFFECT(1, VAPORIZER_RED_HIT, "TE_TEI_G3RED_HIT")
+EFFECT(1, VAPORIZER_HIT_RED, "TE_TEI_G3RED_HIT")
EFFECT(1, VAPORIZER_BLUE, "TE_TEI_G3BLUE")
-EFFECT(1, VAPORIZER_BLUE_HIT, "TE_TEI_G3BLUE_HIT")
+EFFECT(1, VAPORIZER_HIT_BLUE, "TE_TEI_G3BLUE_HIT")
EFFECT(1, VAPORIZER_YELLOW, "TE_TEI_G3YELLOW")
-EFFECT(1, VAPORIZER_YELLOW_HIT, "TE_TEI_G3YELLOW_HIT")
+EFFECT(1, VAPORIZER_HIT_YELLOW, "TE_TEI_G3YELLOW_HIT")
EFFECT(1, VAPORIZER_PINK, "TE_TEI_G3PINK")
-EFFECT(1, VAPORIZER_PINK_HIT, "TE_TEI_G3PINK_HIT")
+EFFECT(1, VAPORIZER_HIT_PINK, "TE_TEI_G3PINK_HIT")
EFFECT(1, VAPORIZER_NEUTRAL, "TE_TEI_G3")
-EFFECT(1, VAPORIZER_NEUTRAL_HIT, "TE_TEI_G3_HIT")
+EFFECT(1, VAPORIZER_HIT_NEUTRAL, "TE_TEI_G3_HIT")
entity EFFECT_VAPORIZER(int teamid)
{
switch (teamid) {
default: return EFFECT_VAPORIZER_NEUTRAL;
}
}
+entity EFFECT_VAPORIZER_HIT(int teamid)
+{
+ switch (teamid) {
+ case NUM_TEAM_1: return EFFECT_VAPORIZER_HIT_RED;
+ case NUM_TEAM_2: return EFFECT_VAPORIZER_HIT_BLUE;
+ case NUM_TEAM_3: return EFFECT_VAPORIZER_HIT_YELLOW;
+ case NUM_TEAM_4: return EFFECT_VAPORIZER_HIT_PINK;
+ default: return EFFECT_VAPORIZER_HIT_NEUTRAL;
+ }
+}
EFFECT(0, RIFLE_IMPACT, "machinegun_impact")
EFFECT(0, RIFLE_MUZZLEFLASH, "rifle_muzzleflash")
EFFECT(0, SPAWNPOINT_NEUTRAL, "spawn_point_neutral")
EFFECT(0, SPAWN_NEUTRAL, "spawn_event_neutral")
-EFFECT(0, NADE_RED_EXPLODE, "nade_red_explode")
-EFFECT(0, NADE_BLUE_EXPLODE, "nade_blue_explode")
-EFFECT(0, NADE_YELLOW_EXPLODE, "nade_yellow_explode")
-EFFECT(0, NADE_PINK_EXPLODE, "nade_pink_explode")
-EFFECT(0, NADE_NEUTRAL_EXPLODE, "nade_neutral_explode")
+EFFECT(0, NADE_EXPLODE_RED, "nade_red_explode")
+EFFECT(0, NADE_EXPLODE_BLUE, "nade_blue_explode")
+EFFECT(0, NADE_EXPLODE_YELLOW, "nade_yellow_explode")
+EFFECT(0, NADE_EXPLODE_PINK, "nade_pink_explode")
+EFFECT(0, NADE_EXPLODE_NEUTRAL, "nade_neutral_explode")
+entity EFFECT_NADE_EXPLODE(int teamid)
+{
+ switch (teamid) {
+ case NUM_TEAM_1: return EFFECT_NADE_EXPLODE_RED;
+ case NUM_TEAM_2: return EFFECT_NADE_EXPLODE_BLUE;
+ case NUM_TEAM_3: return EFFECT_NADE_EXPLODE_YELLOW;
+ case NUM_TEAM_4: return EFFECT_NADE_EXPLODE_PINK;
+ default: return EFFECT_NADE_EXPLODE_NEUTRAL;
+ }
+}
EFFECT(1, NADE_TRAIL_RED, "nade_red")
EFFECT(1, NADE_TRAIL_BLUE, "nade_blue")
}
}
-EFFECT(1, RED_PASS, "red_pass")
-EFFECT(1, BLUE_PASS, "blue_pass")
-EFFECT(1, YELLOW_PASS, "yellow_pass")
-EFFECT(1, PINK_PASS, "pink_pass")
-EFFECT(1, NEUTRAL_PASS, "neutral_pass")
+EFFECT(1, PASS_RED, "red_pass")
+EFFECT(1, PASS_BLUE, "blue_pass")
+EFFECT(1, PASS_YELLOW, "yellow_pass")
+EFFECT(1, PASS_PINK, "pink_pass")
+EFFECT(1, PASS_NEUTRAL, "neutral_pass")
EFFECT(0, CAP_RED, "red_cap")
EFFECT(0, CAP_BLUE, "blue_cap")
Send_Effect(EFFECT_VORTEX_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
// teamcolor / hit beam effect
- vector v;
- v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
- switch(self.team)
- {
- case NUM_TEAM_1: // Red
- if(damage_goodhits)
- Send_Effect(EFFECT_VAPORIZER_RED_HIT, w_shotorg, v, 1);
- else
- Send_Effect(EFFECT_VAPORIZER_RED, w_shotorg, v, 1);
- break;
- case NUM_TEAM_2: // Blue
- if(damage_goodhits)
- Send_Effect(EFFECT_VAPORIZER_BLUE_HIT, w_shotorg, v, 1);
- else
- Send_Effect(EFFECT_VAPORIZER_BLUE, w_shotorg, v, 1);
- break;
- case NUM_TEAM_3: // Yellow
- if(damage_goodhits)
- Send_Effect(EFFECT_VAPORIZER_YELLOW_HIT, w_shotorg, v, 1);
- else
- Send_Effect(EFFECT_VAPORIZER_YELLOW, w_shotorg, v, 1);
- break;
- case NUM_TEAM_4: // Pink
- if(damage_goodhits)
- Send_Effect(EFFECT_VAPORIZER_PINK_HIT, w_shotorg, v, 1);
- else
- Send_Effect(EFFECT_VAPORIZER_PINK, w_shotorg, v, 1);
- break;
- default:
- if(damage_goodhits)
- Send_Effect_("TE_TEI_G3_HIT", w_shotorg, v, 1);
- else
- Send_Effect_("TE_TEI_G3", w_shotorg, v, 1);
- break;
- }
+ vector v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
+ Send_Effect((damage_goodhits ? EFFECT_VAPORIZER_HIT(self.team) : EFFECT_VAPORIZER(self.team)), w_shotorg, v, 1);
if(autocvar_g_rm)
if(!(trace_dphitq3surfaceflags & (Q3SURFACEFLAG_SKY | Q3SURFACEFLAG_NOIMPACT)))
{
if ( autocvar_g_nades_ice_explode )
{
- entity expef = NULL;
- switch(self.realowner.team)
- {
- case NUM_TEAM_1: expef = EFFECT_NADE_RED_EXPLODE; break;
- case NUM_TEAM_2: expef = EFFECT_NADE_BLUE_EXPLODE; break;
- case NUM_TEAM_3: expef = EFFECT_NADE_YELLOW_EXPLODE; break;
- case NUM_TEAM_4: expef = EFFECT_NADE_PINK_EXPLODE; break;
- default: expef = EFFECT_NADE_NEUTRAL_EXPLODE; break;
- }
+ entity expef = EFFECT_NADE_EXPLODE(self.realowner.team);
Send_Effect(expef, self.origin + '0 0 1', '0 0 0', 1);
sound(self, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
default:
case NADE_TYPE_NORMAL:
- switch(self.realowner.team)
- {
- case NUM_TEAM_1: expef = EFFECT_NADE_RED_EXPLODE; break;
- case NUM_TEAM_2: expef = EFFECT_NADE_BLUE_EXPLODE; break;
- case NUM_TEAM_3: expef = EFFECT_NADE_YELLOW_EXPLODE; break;
- case NUM_TEAM_4: expef = EFFECT_NADE_PINK_EXPLODE; break;
- default: expef = EFFECT_NADE_NEUTRAL_EXPLODE; break;
- }
+ expef = EFFECT_NADE_EXPLODE(self.realowner.team);
+ break;
}
if(expef)