From: Mario Date: Thu, 27 Sep 2018 02:06:03 +0000 (+1000) Subject: Make bots obey g_maxplayers X-Git-Tag: xonotic-v0.8.5~1816^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F601%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git Make bots obey g_maxplayers --- diff --git a/qcsrc/server/bot/default/bot.qc b/qcsrc/server/bot/default/bot.qc index 2a6164a28..12e93821f 100644 --- a/qcsrc/server/bot/default/bot.qc +++ b/qcsrc/server/bot/default/bot.qc @@ -607,6 +607,8 @@ float bot_fixcount() // add bots to reach minplayers if needed bots = max(minbots, minplayers - activerealplayers); // cap bots to the max players allowed by the server + if(autocvar_g_maxplayers) + bots = min(bots, autocvar_g_maxplayers - activerealplayers); bots = min(bots, maxclients - realplayers); if(bots > minbots)