From 565e9cd2b2304c5c77552af4b5b7dbe0547b347f Mon Sep 17 00:00:00 2001 From: s1lent Date: Sun, 17 Dec 2017 19:34:05 +0700 Subject: [PATCH] Prevent spam in console if bot_quota is more than spawn points, so decreases bot_quota every time if create bot fails --- regamedll/dlls/bot/cs_bot_manager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/regamedll/dlls/bot/cs_bot_manager.cpp b/regamedll/dlls/bot/cs_bot_manager.cpp index a95380f4..963823f8 100644 --- a/regamedll/dlls/bot/cs_bot_manager.cpp +++ b/regamedll/dlls/bot/cs_bot_manager.cpp @@ -797,6 +797,13 @@ bool CCSBotManager::BotAddCommand(BotProfileTeamType team, bool isFromConsole) CVAR_SET_FLOAT("bot_quota", cv_bot_quota.value + 1); } } +#ifdef REGAMEDLL_FIXES + else + { + // decrease the bot quota + CVAR_SET_FLOAT("bot_quota", cv_bot_quota.value - 1); + } +#endif return true; }