set g_ctf_fullbrightflags 0
set g_ctf_dynamiclights 0
set g_ctf_allow_drop 1 "dropping allows circumventing carrierkill score, so enable this with care!"
-set g_ctf_reverse 0 "when 1, bases/flags are switched :P you have to capture your OWN flag by bringing it to the ENEMY's"
+set g_ctf_reverse 0 "if enabled, flags positions are switched: you have to capture the enemy's flag from your own base by bringing it to your own flag in the enemy base"
set g_balance_ctf_delay_collect 1.0
set g_balance_ctf_damageforcescale 1
(default ctf/respawn.wav)
*/
+void spawnfunc_item_flag_team2();
void spawnfunc_item_flag_team1()
{
if (!g_ctf)
return;
}
+ if (g_ctf_reverse)
+ {
+ float old_g_ctf_reverse = g_ctf_reverse;
+ g_ctf_reverse = 0; // avoid an endless loop
+ spawnfunc_item_flag_team2();
+ g_ctf_reverse = old_g_ctf_reverse;
+ return;
+ }
+
// link flag into ctf_worldflaglist
self.ctf_worldflagnext = ctf_worldflaglist;
ctf_worldflaglist = self;
self.classname = "item_flag_team";
- if(g_ctf_reverse)
- {
- self.team = COLOR_TEAM2; // color 13 team (blue)
- self.items = IT_KEY1; // silver key (bluish enough)
- }
- else
- {
- self.team = COLOR_TEAM1; // color 4 team (red)
- self.items = IT_KEY2; // gold key (redish enough)
- }
+ self.team = COLOR_TEAM1; // color 4 team (red)
+ self.items = IT_KEY2; // gold key (redish enough)
self.netname = "^1RED^7 flag";
self.target = "###item###";
self.skin = autocvar_g_ctf_flag_red_skin;
return;
}
+ if (g_ctf_reverse)
+ {
+ float old_g_ctf_reverse = g_ctf_reverse;
+ g_ctf_reverse = 0; // avoid an endless loop
+ spawnfunc_item_flag_team1();
+ g_ctf_reverse = old_g_ctf_reverse;
+ return;
+ }
+
// link flag into ctf_worldflaglist
self.ctf_worldflagnext = ctf_worldflaglist;
ctf_worldflaglist = self;
self.classname = "item_flag_team";
- if(g_ctf_reverse)
- {
- self.team = COLOR_TEAM1; // color 4 team (red)
- self.items = IT_KEY2; // gold key (redish enough)
- }
- else
- {
- self.team = COLOR_TEAM2; // color 13 team (blue)
- self.items = IT_KEY1; // silver key (bluish enough)
- }
+ self.team = COLOR_TEAM2; // color 13 team (blue)
+ self.items = IT_KEY1; // silver key (bluish enough)
self.netname = "^4BLUE^7 flag";
self.target = "###item###";
self.skin = autocvar_g_ctf_flag_blue_skin;