From 14be00bc6bc374b995d67c51cd1a849f58ed083a Mon Sep 17 00:00:00 2001 From: jeefo Date: Tue, 13 Sep 2016 20:03:50 +0300 Subject: [PATCH] dedicated server shouldn't count real players when computing bot quota. --- source/manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/manager.cpp b/source/manager.cpp index 7324f50..153b99c 100644 --- a/source/manager.cpp +++ b/source/manager.cpp @@ -440,7 +440,7 @@ void BotManager::MaintainBotQuota (void) yb_quota.SetInt (0); // always keep one slot - int maxClients = yb_autovacate.GetBool () ? engine.MaxClients () - 1 - GetHumansNum () : engine.MaxClients (); + int maxClients = yb_autovacate.GetBool () ? engine.MaxClients () - 1 - (engine.IsDedicatedServer () ? 0 : GetHumansNum ()) : engine.MaxClients (); if (yb_quota.GetInt () > maxClients) yb_quota.SetInt (maxClients); @@ -491,7 +491,7 @@ void BotManager::FillServer (int selection, int personality, int difficulty, int // this function fill server with bots, with specified team & personality // always keep one slot - int maxClients = yb_autovacate.GetBool () ? engine.MaxClients () - 1 - GetHumansNum () : engine.MaxClients (); + int maxClients = yb_autovacate.GetBool () ? engine.MaxClients () - 1 - (engine.IsDedicatedServer () ? 0 : GetHumansNum ()) : engine.MaxClients (); if (GetBotsNum () >= maxClients - GetHumansNum ()) return;