From 601296da181faeb86e17432b450d4e6cace0e3b1 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 8 Jun 2019 13:52:17 +0200 Subject: [PATCH] Automatically keep bots balanced even if g_balance_teams and g_balance_teams_prevent_imbalance are off (e.g. when human players disconnect or manually change team) --- qcsrc/server/teamplay.qc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index f2e24a7a5..ff9438e76 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -865,12 +865,10 @@ int TeamBalance_CompareTeams(entity balance, int team_index_a, int team_index_b, void TeamBalance_AutoBalanceBots() { - if (!autocvar_g_balance_teams || - !autocvar_g_balance_teams_prevent_imbalance) - { - return; - } - //PrintToChatAll("TeamBalance_AutoBalanceBots"); + // checks disabled because we always want auto-balanced bots + //if (!(autocvar_g_balance_teams && autocvar_g_balance_teams_prevent_imbalance)) + // return; + entity balance = TeamBalance_CheckAllowedTeams(NULL); TeamBalance_GetTeamCounts(balance, NULL); int smallest_team_index = 0; -- 2.39.2