Skip to content

Commit

Permalink
always consider all human players on the server to use bot_auto_vacat…
Browse files Browse the repository at this point in the history
…e correctly
  • Loading branch information
s1lentq committed Dec 10, 2024
1 parent 3efc5ad commit 8a77bba
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions regamedll/dlls/bot/cs_bot_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 8a77bba

Please sign in to comment.