set g_ctf_flagcarrier_selfforcefactor 1
set g_ctf_flagcarrier_damagefactor 1
set g_ctf_flagcarrier_forcefactor 1
-set g_ctf_flagcarrier_waypointforenemy_stalemate 60 "show the enemy flagcarrier location after both teams have held the flags for this amount of time"
+set g_ctf_stalemate 1 "show the enemy flagcarrier location after both teams have held the flags a certain amount of time"
+set g_ctf_stalemate_endcondition 1 "condition for stalemate mode to be finished: 1 = If ONE flag is no longer stale, 2 = If BOTH flags are no longer stale"
+set g_ctf_stalemate_time 60 "time for each flag until stalemate mode is activated"
set g_ctf_flagcarrier_waypointforenemy_spotting 1 "show the enemy flagcarrier location if a team mate presses +use to spot them"
set g_ctf_dropped_capture_delay 1 "dropped capture delay"
set g_ctf_dropped_capture_radius 100 "allow dropped flags to be automatically captured by base flags if the dropped flag is within this radius of it"
float autocvar_g_ctf_flagcarrier_selfforcefactor;
float autocvar_g_ctf_flagcarrier_damagefactor;
float autocvar_g_ctf_flagcarrier_forcefactor;
-float autocvar_g_ctf_flagcarrier_waypointforenemy_stalemate;
//float autocvar_g_ctf_flagcarrier_waypointforenemy_spotting;
float autocvar_g_ctf_fullbrightflags;
float autocvar_g_ctf_ignore_frags;
float autocvar_g_ctf_shield_force;
float autocvar_g_ctf_shield_max_ratio;
float autocvar_g_ctf_shield_min_negscore;
+float autocvar_g_ctf_stalemate;
+float autocvar_g_ctf_stalemate_endcondition;
+float autocvar_g_ctf_stalemate_time;
float autocvar_g_ctf_reverse;
float autocvar_g_ctf_dropped_capture_delay;
float autocvar_g_ctf_dropped_capture_radius;
FOR_EACH_REALPLAYER(tmp_player)
{
if(tmp_player == player)
+ {
centerprint(tmp_player, strcat("You got the ", flag.netname, "!"));
+ //if(ctf_stalemate) { centerprint(tmp_player, "Stalemate! Enemies can see you on radar!"); }
+ }
//else if(!IsDifferentTeam(tmp_player, player))
// centerprint(tmp_player, strcat("Your ", Team_ColorCode(player.team), "team mate ", verbosename, "^7got the flag! Protect them!"));
else if(!IsDifferentTeam(tmp_player, flag))
// build list of stale flags
for(tmp_entity = ctf_worldflaglist; tmp_entity; tmp_entity = tmp_entity.ctf_worldflagnext)
{
- if(autocvar_g_ctf_flagcarrier_waypointforenemy_stalemate)
+ if(autocvar_g_ctf_stalemate)
if(tmp_entity.ctf_status != FLAG_BASE)
- if(time >= tmp_entity.ctf_pickuptime + autocvar_g_ctf_flagcarrier_waypointforenemy_stalemate)
+ if(time >= tmp_entity.ctf_pickuptime + autocvar_g_ctf_stalemate_time)
{
tmp_entity.ctf_staleflagnext = ctf_staleflaglist; // link flag into staleflaglist
ctf_staleflaglist = tmp_entity;
if(stale_red_flags && stale_blue_flags)
ctf_stalemate = TRUE;
- else if(!stale_red_flags && !stale_blue_flags)
- ctf_stalemate = FALSE;
-
+ else if((!stale_red_flags && !stale_blue_flags) && autocvar_g_ctf_stalemate_endcondition == 2)
+ { ctf_stalemate = FALSE; wpforenemy_announced = FALSE; }
+ else if((!stale_red_flags || !stale_blue_flags) && autocvar_g_ctf_stalemate_endcondition == 1)
+ { ctf_stalemate = FALSE; wpforenemy_announced = FALSE; }
+
// if sufficient stalemate, then set up the waypointsprite and announce the stalemate if necessary
if(ctf_stalemate)
{
ImpulseCommands();
self = tmp_entity;
}
- if(autocvar_g_ctf_flagcarrier_waypointforenemy_stalemate)
+ if(autocvar_g_ctf_stalemate)
{
if(time >= wpforenemy_nextthink)
{
flag.ctf_dropper = world;
flag.ctf_pickuptime = 0;
flag.ctf_droptime = 0;
-
- wpforenemy_announced = FALSE;
}
void ctf_Reset()