set lastlevel ""
set quit_when_empty 0 "set to 1, then the server exits when the next level would start but is empty"
set quit_and_redirect "" "set to an IP to redirect all players at the end of the match to another server. Set to \"self\" to let all players reconnect at the end of the match (use it to make seamless engine updates)"
+set quit_and_redirect_timer 1.5 "set to number of seconds after quit before performing the connect operation of quit_and_redirect"
// singleplayer campaign
set g_campaign 0
alias menu_sync "menu_cmd sync"
set sv_join_notices ""
-set sv_join_notices_time 15
\ No newline at end of file
+set sv_join_notices_time 15
string autocvar_nextmap;
float autocvar_prvm_backtraceforwarnings;
string autocvar_quit_and_redirect;
+float autocvar_quit_and_redirect_timer;
float autocvar_quit_when_empty;
float autocvar_r_showbboxes;
float autocvar_rescan_pending;
clients_found = 0;
FOR_EACH_REALCLIENT(self)
{
+ // TODO add timer
print("Redirecting: sending connect command to ", self.netname, "\n");
if(redirection_target == "self")
- stuffcmd(self, "\ndisconnect; reconnect\n");
+ stuffcmd(self, "\ndisconnect; defer ", ftos(autocvar_quit_and_redirect_timer), " reconnect\n");
else
- stuffcmd(self, strcat("\ndisconnect; connect ", redirection_target, "\n"));
+ stuffcmd(self, strcat("\ndisconnect; defer ", ftos(autocvar_quit_and_redirect_timer), " \"connect ", redirection_target, "\"\n"));
++clients_found;
}