]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
g_warmup -1: when rounding to a team multiple, go up at the midpoint
authorbones_was_here <bones_was_here@xonotic.au>
Wed, 22 Jan 2025 11:50:30 +0000 (21:50 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Wed, 22 Jan 2025 11:50:30 +0000 (21:50 +1000)
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

qcsrc/server/world.qc

index e0bfbe2289e9792b1bf60a328058d4323acb06c9..9f87ee28f3742a45dad19f8285435bf94f2b47ac 100644 (file)
@@ -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