]> 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 2a6164a2826875af507597ba8523bf629bee0403..0c4668f2f38d3c05eeb5b24e3ff8d44cb861d753 100644 (file)
@@ -607,6 +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
+               int player_limit = GetPlayerLimit();
+               if(player_limit)
+                       bots = min(bots, player_limit - activerealplayers);
                bots = min(bots, maxclients - realplayers);
 
                if(bots > minbots)