* fix bot kick
* fix flood "All bot profiles at this difficulty level are in use." in console
This commit is contained in:
Vaqtincha 2020-06-11 00:23:38 +05:00 committed by GitHub
parent 8142303b1b
commit 36b46bf996
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -783,6 +783,15 @@ bool CCSBotManager::BotAddCommand(BotProfileTeamType team, bool isFromConsole)
if (!profile)
{
CONSOLE_ECHO("All bot profiles at this difficulty level are in use.\n");
#ifdef REGAMEDLL_FIXES
// decrease the bot quota
if (!isFromConsole)
{
CVAR_SET_FLOAT("bot_quota", cv_bot_quota.value - 1);
}
#endif
return true;
}
}
@ -820,7 +829,10 @@ bool CCSBotManager::BotAddCommand(BotProfileTeamType team, bool isFromConsole)
else
{
// decrease the bot quota
CVAR_SET_FLOAT("bot_quota", cv_bot_quota.value - 1);
if (!isFromConsole)
{
CVAR_SET_FLOAT("bot_quota", cv_bot_quota.value - 1);
}
}
#endif