No return interfering with any overrides
This commit is contained in:
ChocoTaco1 2020-09-03 18:45:29 -04:00
parent 372f311b70
commit dbb1db525e

View file

@ -47,12 +47,11 @@ function DefaultGame::onClientKilled(%game, %clVictim, %clKiller, %damageType, %
if($BigTeam !$= "" && %clVictim.team == $BigTeam) if($BigTeam !$= "" && %clVictim.team == $BigTeam)
{ {
//If someone switches to observer or disconnects
if(%damageType $= 0)
return;
%otherteam = $BigTeam == 1 ? 2 : 1; %otherteam = $BigTeam == 1 ? 2 : 1;
if($TeamRank[$BigTeam, count] - $TeamRank[%otherteam, count] >= 2) if($TeamRank[$BigTeam, count] - $TeamRank[%otherteam, count] >= 2)
{
//If someone switches to observer or disconnects
if(%damageType !$= 0)
{ {
echo(%clVictim.nameBase @ " has been moved to Team " @ %otherTeam @ " for balancing."); 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]); messageClient(%clVictim, 'MsgTeamBalanceNotify', '\c0You were switched to Team %1 for balancing.~wfx/powered/vehicle_screen_on.wav', $TeamName[%otherteam]);
@ -60,6 +59,7 @@ function DefaultGame::onClientKilled(%game, %clVictim, %clKiller, %damageType, %
Game.clientChangeTeam( %clVictim, %otherTeam, 0 ); Game.clientChangeTeam( %clVictim, %otherTeam, 0 );
} }
}
else else
{ {
$BigTeam = ""; $BigTeam = "";