]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commit
Implement automatic per-map min & max player limits
authorbones_was_here <bones_was_here@xonotic.au>
Mon, 26 Sep 2022 05:21:58 +0000 (15:21 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Mon, 26 Sep 2022 05:21:58 +0000 (15:21 +1000)
commit613663cc624d93b575bbb2e1402ab673d94d02c7
tree4d18b2ed4d44535c7832c4259817f18023f6754c
parented5169c17519c5cbbccc03044fe76f0f99da5b00
Implement automatic per-map min & max player limits

Enabled by g_warmup -1 and g_maxplayers -1 respectively.

Map settings are loaded from .sizes files
and are rounded to a multiple of the number of teams.
At the midpoint, min players is rounded down and max players is rounded up.
Neither can exceed engine maxplayers which is also rounded down if necessary.

g_warmup -1 means stay in warmup until enough players have joined,
then switch to g_warmup_limit and wait for ready players.
"Enough" has a lower limit of 2 or 2 * number of teams,
so this can be useful on maps with no set minimum.
qcsrc/server/client.qc
qcsrc/server/command/vote.qc
qcsrc/server/world.qc
qcsrc/server/world.qh
xonotic-server.cfg