mgr: fix bot quota overflow when adding manually
This commit is contained in:
parent
99aac1b2ee
commit
7fa4cc5f70
2 changed files with 2 additions and 2 deletions
|
|
@ -1 +1 @@
|
||||||
Subproject commit 37d592703b23c0762a3fc285d2841da11bb6d525
|
Subproject commit ce3a62a810be70ae44385ce15ac8276908856e21
|
||||||
|
|
@ -383,7 +383,7 @@ void BotManager::maintainQuota () {
|
||||||
const BotCreateResult createResult = create (request.name, request.difficulty, request.personality, request.team, request.skin);
|
const BotCreateResult createResult = create (request.name, request.difficulty, request.personality, request.team, request.skin);
|
||||||
|
|
||||||
if (request.manual) {
|
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
|
// check the result of creation
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue