Added checks

This commit is contained in:
ChocoTaco1 2022-06-10 14:56:58 -04:00
parent e4483ab58b
commit d6c2e1d182

View file

@ -175,6 +175,9 @@ function GameConnection::onDrop(%client, %reason)
// Called in GetTeamCounts // Called in GetTeamCounts
function TeamBalanceNotify(%game) function TeamBalanceNotify(%game)
{ {
if(!$Host::EnableTeamBalanceNotify && !$Host::EnableAutobalance)
return;
if( Game.numTeams > 1 && $TotalTeamPlayerCount !$= 0 ) if( Game.numTeams > 1 && $TotalTeamPlayerCount !$= 0 )
{ {
//Uneven //Uneven
@ -228,6 +231,9 @@ function NotifyUnbalanced( %game )
if(isEventPending($NotifySchedule)) if(isEventPending($NotifySchedule))
cancel($NotifySchedule); cancel($NotifySchedule);
if(!$Host::EnableTeamBalanceNotify && !$Host::EnableAutobalance)
return;
if( $TBNStatus !$= "NOTIFY" ) //If Status has changed to EVEN or anything else (GameOver reset). if( $TBNStatus !$= "NOTIFY" ) //If Status has changed to EVEN or anything else (GameOver reset).
return; return;
@ -360,6 +366,9 @@ function Autobalance( %game )
if(isEventPending($AutoBalanceSchedule)) if(isEventPending($AutoBalanceSchedule))
cancel($AutoBalanceSchedule); cancel($AutoBalanceSchedule);
if(!$Host::EnableAutobalance)
return;
if($TBNStatus !$= "NOTIFY") //If Status has changed to EVEN or anything else (GameOver reset). if($TBNStatus !$= "NOTIFY") //If Status has changed to EVEN or anything else (GameOver reset).
return; return;