From 8a77bba94d8dd2c962ba0694639c8d4c92e177da Mon Sep 17 00:00:00 2001 From: s1lentq Date: Wed, 11 Dec 2024 03:50:44 +0700 Subject: [PATCH] always consider all human players on the server to use bot_auto_vacate correctly --- regamedll/dlls/bot/cs_bot_manager.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/regamedll/dlls/bot/cs_bot_manager.cpp b/regamedll/dlls/bot/cs_bot_manager.cpp index 730805bbf..a5be7342e 100644 --- a/regamedll/dlls/bot/cs_bot_manager.cpp +++ b/regamedll/dlls/bot/cs_bot_manager.cpp @@ -889,12 +889,10 @@ void CCSBotManager::MaintainBotQuota() if (m_isLearningMap) return; - int totalHumansInGame = UTIL_HumansInGame(); - int humanPlayersInGame = UTIL_HumansInGame(IGNORE_SPECTATORS); - int spectatorPlayersInGame = UTIL_SpectatorsInGame(); + int humanPlayersInGame = UTIL_HumansInGame(); // don't add bots until local player has been registered, to make sure he's player ID #1 - if (!IS_DEDICATED_SERVER() && totalHumansInGame == 0) + if (!IS_DEDICATED_SERVER() && humanPlayersInGame == 0) return; int desiredBotCount = int(cv_bot_quota.value); @@ -949,7 +947,7 @@ void CCSBotManager::MaintainBotQuota() // wait for a player to join, if necessary if (cv_bot_join_after_player.value > 0.0) { - if (humanPlayersInGame == 0 && spectatorPlayersInGame == 0) + if (humanPlayersInGame == 0) desiredBotCount = 0; }