From edad1298365f3ce2ff7c29fd5a0a6e86a55d26b8 Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Fri, 2 Apr 2021 17:46:37 -0400 Subject: [PATCH] Update Autobalance.cs --- Classic/scripts/autoexec/Autobalance.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Classic/scripts/autoexec/Autobalance.cs b/Classic/scripts/autoexec/Autobalance.cs index 44027f9..1d05c35 100644 --- a/Classic/scripts/autoexec/Autobalance.cs +++ b/Classic/scripts/autoexec/Autobalance.cs @@ -61,9 +61,6 @@ function Autobalance( %game ) //Select lower half of team rank as canidates for team change if(!$Autobalance::UseAllMode) { - //Reset clients canidate var - ResetABClients(); - $Autobalance::Max = mFloor($TeamRank[$BigTeam, count]/2); for(%i = $Autobalance::Max; %i < $TeamRank[$BigTeam, count]; %i++) { @@ -127,14 +124,17 @@ function DefaultGame::gameOver(%game) { Parent::gameOver(%game); - //Reset Autobalance - $BigTeam = ""; - - //Reset all clients canidate var - for (%i = 0; %i < ClientGroup.getCount(); %i++) + if($CurrentMissionType $= "CTF" || $CurrentMissionType $= "SCtF") { - %client = ClientGroup.getObject(%i); - %client.abCanidate = false; + //Reset Autobalance + $BigTeam = ""; + + //Reset all clients canidate var + for (%i = 0; %i < ClientGroup.getCount(); %i++) + { + %client = ClientGroup.getObject(%i); + %client.abCanidate = false; + } } }