]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/bot.qc
Merge branch 'master' into Mario/duel
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / bot.qc
index ec84e55167618aea25811a9242963c40a5e22c52..d9d05773e42b949b1b19522cd1c5246bee1cb7b0 100644 (file)
@@ -608,6 +608,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)