+ if (t_players < map_minplayers) // map_minplayers will only be set if g_warmup -1 at worldspawn
+ {
+ // TODO: handle player spectating/disconnecting during countdown
+ if (warmup_limit > 0)
+ warmup_limit = -1;
+ return; // don't ReadyRestart if players are ready but too few
+ }
+ else if (map_minplayers && warmup_limit <= 0)
+ {
+ // there's enough players now but we're still in infinite warmup
+ warmup_limit = cvar("g_warmup_limit");
+ if (warmup_limit == 0)
+ warmup_limit = autocvar_timelimit * 60;
+ if (warmup_limit > 0)
+ game_starttime = time;
+ // implicit else: g_warmup -1 && g_warmup_limit -1 means
+ // warmup continues until enough players AND enough RUPs (no time limit)
+ }
+