From: terencehill Date: Sat, 8 Jun 2019 11:52:17 +0000 (+0200) Subject: Automatically keep bots balanced even if g_balance_teams and g_balance_teams_prevent_... X-Git-Tag: xonotic-v0.8.5~1465^2 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=601296da181faeb86e17432b450d4e6cace0e3b1;p=xonotic%2Fxonotic-data.pk3dir.git 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) --- 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;