For example with 10 players joined and g_warmup_majority_factor 0.8
the old code required 9 players to be ready, new code requires 8.
Behaviour is unchanged when joined players * factor is not an integer.
Also improve cvar description.
// warmup continues until enough players AND enough RUPs (no time limit)
}
- ready_needed_factor = bound(0.5, cvar("g_warmup_majority_factor"), 0.999);
- ready_needed_count = floor(t_players * ready_needed_factor) + 1;
+ ready_needed_factor = bound(0.5, cvar("g_warmup_majority_factor"), 1);
+ ready_needed_count = ceil(t_players * ready_needed_factor);
if (readycount >= ready_needed_count) ReadyRestart(true);
}
set g_warmup_limit 180 "limit warmup-stage to this time (in seconds); if set to -1 the warmup-stage is not affected by any timelimit, if set to 0 the usual timelimit also affects warmup-stage"
set g_warmup_allow_timeout 0 "allow calling timeouts in the warmup-stage (if sv_timeout is set to 1)"
set g_warmup_allguns 1 "provide more weapons on start while in warmup: 0 = normal start weapons, 1 = all guns available on the map, 2 = all normal weapons"
-set g_warmup_majority_factor 0.8 "minimum percentage of players ready needed for warmup to end"
+set g_warmup_majority_factor 0.8 "fraction of joined players sufficient to end warmup before g_warmup_limit by readying up"
alias sv_hook_warmupend