From dbb1db525e0446fa499809b3a28316c12e986392 Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Thu, 3 Sep 2020 18:45:29 -0400 Subject: [PATCH] Changed No return interfering with any overrides --- Classic/scripts/autoexec/Autobalance.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Classic/scripts/autoexec/Autobalance.cs b/Classic/scripts/autoexec/Autobalance.cs index 031bec7..3eadafa 100644 --- a/Classic/scripts/autoexec/Autobalance.cs +++ b/Classic/scripts/autoexec/Autobalance.cs @@ -47,18 +47,18 @@ function DefaultGame::onClientKilled(%game, %clVictim, %clKiller, %damageType, % if($BigTeam !$= "" && %clVictim.team == $BigTeam) { - //If someone switches to observer or disconnects - if(%damageType $= 0) - return; - %otherteam = $BigTeam == 1 ? 2 : 1; if($TeamRank[$BigTeam, count] - $TeamRank[%otherteam, count] >= 2) { - echo(%clVictim.nameBase @ " has been moved to Team " @ %otherTeam @ " for balancing."); - messageClient(%clVictim, 'MsgTeamBalanceNotify', '\c0You were switched to Team %1 for balancing.~wfx/powered/vehicle_screen_on.wav', $TeamName[%otherteam]); - messageAllExcept(%clVictim, -1, 'MsgTeamBalanceNotify', '~wfx/powered/vehicle_screen_on.wav'); - - Game.clientChangeTeam( %clVictim, %otherTeam, 0 ); + //If someone switches to observer or disconnects + if(%damageType !$= 0) + { + echo(%clVictim.nameBase @ " has been moved to Team " @ %otherTeam @ " for balancing."); + messageClient(%clVictim, 'MsgTeamBalanceNotify', '\c0You were switched to Team %1 for balancing.~wfx/powered/vehicle_screen_on.wav', $TeamName[%otherteam]); + messageAllExcept(%clVictim, -1, 'MsgTeamBalanceNotify', '~wfx/powered/vehicle_screen_on.wav'); + + Game.clientChangeTeam( %clVictim, %otherTeam, 0 ); + } } else {