From 3b0a06185f8581577825241de865998e409ed638 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 30 Sep 2018 22:29:06 +1000 Subject: [PATCH] Use the new player limit function for limiting bot count --- qcsrc/server/bot/default/bot.qc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qcsrc/server/bot/default/bot.qc b/qcsrc/server/bot/default/bot.qc index d9d05773e..0c4668f2f 100644 --- a/qcsrc/server/bot/default/bot.qc +++ b/qcsrc/server/bot/default/bot.qc @@ -593,7 +593,6 @@ float bot_fixcount() }); } - //int player_limit = GetPlayerLimit(); // TODO: use this instead of maxclients! int bots; // But don't remove bots immediately on level change, as the real players // usually haven't rejoined yet @@ -608,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) -- 2.39.2