EFFECT(0, ARC_BEAM_HEAL, "arc_beam_heal")
EFFECT(0, ARC_BEAM_HEAL_IMPACT, "arc_beam_healimpact")
EFFECT(0, ARC_BEAM_HEAL_IMPACT2, "healray_impact")
+EFFECT(0, ARC_OVERHEAT, "arc_overheat")
+EFFECT(0, ARC_OVERHEAT_FIRE, "arc_overheat_fire")
+EFFECT(0, ARC_SMOKE, "arc_smoke")
EFFECT(0, ARC_LIGHTNING, "arc_lightning")
EFFECT(0, ARC_LIGHTNING2, "electro_lightning")
EFFECT(1, PASS_YELLOW, "yellow_pass")
EFFECT(1, PASS_PINK, "pink_pass")
EFFECT(1, PASS_NEUTRAL, "neutral_pass")
+entity EFFECT_PASS(int teamid)
+{
+ switch (teamid) {
+ case NUM_TEAM_1: return EFFECT_PASS_RED;
+ case NUM_TEAM_2: return EFFECT_PASS_BLUE;
+ case NUM_TEAM_3: return EFFECT_PASS_YELLOW;
+ case NUM_TEAM_4: return EFFECT_PASS_PINK;
+ default: return EFFECT_PASS_NEUTRAL;
+ }
+}
EFFECT(0, CAP_RED, "red_cap")
EFFECT(0, CAP_BLUE, "blue_cap")
if ( WEP_CVAR(arc, overheat_max) > 0 && self.beam_heat >= WEP_CVAR(arc, overheat_max) )
{
- Send_Effect_("arc_overheat",
+ Send_Effect(EFFECT_ARC_OVERHEAT,
self.beam_start, self.beam_wantdir, 1 );
sound(self, CH_WEAPON_A, SND_ARC_STOP, VOL_BASE, ATTN_NORM);
}
if ( self.arc_overheat > time )
{
if ( random() < self.arc_heat_percent )
- Send_Effect_("arc_smoke", smoke_origin, '0 0 0', 1 );
+ Send_Effect(EFFECT_ARC_SMOKE, smoke_origin, '0 0 0', 1 );
if ( self.BUTTON_ATCK || self.BUTTON_ATCK2 )
{
- Send_Effect_("arc_overheat_fire", smoke_origin, w_shotdir, 1 );
+ Send_Effect(EFFECT_ARC_OVERHEAT_FIRE, smoke_origin, w_shotdir, 1 );
if ( !self.arc_smoke_sound )
{
self.arc_smoke_sound = 1;
{
if ( random() < (self.arc_beam.beam_heat-WEP_CVAR(arc, overheat_min)) /
( WEP_CVAR(arc, overheat_max)-WEP_CVAR(arc, overheat_min) ) )
- Send_Effect_("arc_smoke", smoke_origin, '0 0 0', 1 );
+ Send_Effect(EFFECT_ARC_SMOKE, smoke_origin, '0 0 0', 1 );
}
if ( self.arc_smoke_sound && ( self.arc_overheat <= time ||
ctf_CaptureShield_Spawn(self);
}
-void set_flag_string(entity flag, .string field, string value, string teamname)
-{
- if(flag.(field) == "")
- flag.(field) = strzone(sprintf(value,teamname));
-}
-
void ctf_FlagSetup(int teamnumber, entity flag) // called when spawning a flag entity on the map as a spawnfunc
{SELFPARAM();
// declarations
if(!flag.scale) { flag.scale = FLAG_SCALE; }
if(flag.skin == 0) { flag.skin = cvar(sprintf("g_ctf_flag_%s_skin", teamname)); }
if(flag.model == "") { flag.model = cvar_string(sprintf("g_ctf_flag_%s_model", teamname)); }
- set_flag_string(flag, toucheffect, "%sflag_touch", teamname);
- set_flag_string(flag, passeffect, "%s_pass", teamname);
- set_flag_string(flag, capeffect, "%s_cap", teamname);
+ if (flag.toucheffect == "") { flag.toucheffect = EFFECT_FLAG_TOUCH(teamnumber).eent_eff_name; }
+ if (flag.passeffect == "") { flag.passeffect = EFFECT_PASS(teamnumber).eent_eff_name; }
+ if (flag.capeffect == "") { flag.capeffect = EFFECT_CAP(teamnumber).eent_eff_name; }
// sounds
flag.snd_flag_taken = strzone(SND(CTF_TAKEN(teamnumber)));