mgr: fix bot quota overflow when adding manually

This commit is contained in:
jeefo 2024-03-14 14:53:55 +03:00
commit 7fa4cc5f70
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
2 changed files with 2 additions and 2 deletions

@ -1 +1 @@
Subproject commit 37d592703b23c0762a3fc285d2841da11bb6d525
Subproject commit ce3a62a810be70ae44385ce15ac8276908856e21

View file

@ -383,7 +383,7 @@ void BotManager::maintainQuota () {
const BotCreateResult createResult = create (request.name, request.difficulty, request.personality, request.team, request.skin);
if (request.manual) {
cv_quota.set (cv_quota.int_ () + 1);
cv_quota.set (cr::min (cv_quota.int_ () + 1, game.maxClients ()));
}
// check the result of creation