]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/bot.qc
Don't respawn frozen non-players when touching the void
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / bot.qc
index 12e93821f1479246c306490ceb4ec0dfdce9a3d4..0c4668f2f38d3c05eeb5b24e3ff8d44cb861d753 100644 (file)
@@ -607,8 +607,9 @@ 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);
+               int player_limit = GetPlayerLimit();
+               if(player_limit)
+                       bots = min(bots, player_limit - activerealplayers);
                bots = min(bots, maxclients - realplayers);
 
                if(bots > minbots)