From ed75a662c9bce4507f3687994f5f793a9440b7a9 Mon Sep 17 00:00:00 2001 From: jeefo Date: Sun, 21 Jan 2024 16:21:01 +0300 Subject: [PATCH] mods: add more csdm cvars to check --- src/engine.cpp | 3 ++- src/manager.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/engine.cpp b/src/engine.cpp index 0c6e7c9..7101472 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -952,11 +952,12 @@ void Game::applyGameModes () { } static ConVarRef csdm_active ("csdm_active"); + static ConVarRef csdm_version ("csdm_version"); static ConVarRef redm_active ("redm_active"); static ConVarRef mp_freeforall ("mp_freeforall"); // csdm is only with amxx and metamod - if (csdm_active.exists () || redm_active.exists ()) { + if (csdm_active.exists () || redm_active.exists () || csdm_version.exists ()) { if (csdm_active.value () > 0.0f || redm_active.value () > 0.0f) { m_gameFlags |= GameFlags::CSDM; } diff --git a/src/manager.cpp b/src/manager.cpp index ad47639..bc014f1 100644 --- a/src/manager.cpp +++ b/src/manager.cpp @@ -444,7 +444,7 @@ void BotManager::maintainQuota () { auto maxSpawnCount = game.getSpawnCount (Team::Terrorist) + game.getSpawnCount (Team::CT) - humanPlayersInGame; // if has some custom spawn points, max out spawn point counter - if (desiredBotCount > botsInGame && hasCustomCSDMSpawnEntities ()) { + if (desiredBotCount >= botsInGame && hasCustomCSDMSpawnEntities ()) { maxSpawnCount = game.maxClients () + 1; }