From: bones_was_here Date: Wed, 22 Jan 2025 11:50:30 +0000 (+1000) Subject: g_warmup -1: when rounding to a team multiple, go up at the midpoint X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a9905f6fe5f3444f4ada4a185ef81a98bd51b5d9;p=xonotic%2Fxonotic-data.pk3dir.git g_warmup -1: when rounding to a team multiple, go up at the midpoint It seems from much testing that a 5 players min DM map is more likely to suit 3v3 TDM/FT/CA than 2v2. See also: fd673ca98255dc41b080411c59712137b189079e !1082 and !1022 --- diff --git a/qcsrc/server/world.qc b/qcsrc/server/world.qc index e0bfbe228..9f87ee28f 100644 --- a/qcsrc/server/world.qc +++ b/qcsrc/server/world.qc @@ -685,14 +685,15 @@ void GameplayMode_DelayedInit(entity this) if (warmup_stage < 0) { int m = GetPlayerLimit(); - if (m <= 0) m = maxclients; + if (m <= 0) + m = maxclients; map_minplayers = bound(max(2, AVAILABLE_TEAMS * 2), map_minplayers, m); if (teamplay) { // automatic minplayers should be a multiple of team count int down = map_minplayers % AVAILABLE_TEAMS; int up = AVAILABLE_TEAMS - down; - map_minplayers += (up < down && up + map_minplayers <= m) ? up : -down; + map_minplayers += (up <= down && up + map_minplayers <= m) ? up : -down; } } else