mgr: allow to disable spawn count checks (ref #754)

This commit is contained in:
jeefo 2025-12-20 16:00:32 +03:00
commit 4015f8de06
No known key found for this signature in database
GPG key ID: D696786B81B667C8
3 changed files with 13 additions and 1 deletions

View file

@ -69,3 +69,9 @@ EnableFakeBotFeatures = no
; sent to the server console. This replaces yb_logger_disable_logfile cvar. ; sent to the server console. This replaces yb_logger_disable_logfile cvar.
; ;
DisableLogFile = no DisableLogFile = no
;
; Disables enforcement of player spawn limits during bot creation and quota management,
; allowing the use of custom spawn editors.
;
DisableSpawnControl = no

View file

@ -730,7 +730,8 @@ void BotConfig::loadCustomConfig () {
{ "ZMInfectedTeam", "T" }, { "ZMInfectedTeam", "T" },
{ "EnableFakeBotFeatures", "no" }, { "EnableFakeBotFeatures", "no" },
{ "DisableLogFile", "no" }, { "DisableLogFile", "no" },
{ "CheckConnectivityHost", "yapb.jeefo.net" } { "CheckConnectivityHost", "yapb.jeefo.net" },
{ "DisableSpawnControl", "no" }
}; };
}; };
setDefaults (); setDefaults ();

View file

@ -448,6 +448,11 @@ void BotManager::maintainQuota () {
maxSpawnCount = maxClients + 1; maxSpawnCount = maxClients + 1;
} }
// disable spawn control
if (conf.fetchCustom ("DisableSpawnControl").startsWith ("yes")) {
maxSpawnCount = game.maxClients () + 1;
}
// sent message only to console from here // sent message only to console from here
ctrl.setFromConsole (true); ctrl.setFromConsole (true);