From 42ffe4602aff17da09c6a90d830fa74388bb138b Mon Sep 17 00:00:00 2001 From: ChocoTaco Date: Sat, 12 Jan 2019 13:56:06 -0500 Subject: [PATCH] Fixed a bug Fixed a bug where the notification would go off between getcounts intervals even if someone switched, particularly at the last second. --- Classic/scripts/autoexec/TeamBalanceNotify.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Classic/scripts/autoexec/TeamBalanceNotify.cs b/Classic/scripts/autoexec/TeamBalanceNotify.cs index 4ecf339..fda3c7a 100644 --- a/Classic/scripts/autoexec/TeamBalanceNotify.cs +++ b/Classic/scripts/autoexec/TeamBalanceNotify.cs @@ -83,9 +83,12 @@ function StatsUnbalanceSound() { if( $Team1Difference >= 2 || $Team2Difference >= 2 ) { - messageAll('MsgTeamBalanceNotify', '\c1Teams are unbalanced: \c0It is currently %1 vs %2 with %3 observers.~wfx/misc/bounty_objrem2.wav', $PlayerCount[1], $PlayerCount[2], $PlayerCount[0] ); - //Called in 30 secs with sound - schedule(30000, 0, "StatsUnbalanceSound"); + if( !$GetCountsClientTeamChange ) + { + messageAll('MsgTeamBalanceNotify', '\c1Teams are unbalanced: \c0It is currently %1 vs %2 with %3 observers.~wfx/misc/bounty_objrem2.wav', $PlayerCount[1], $PlayerCount[2], $PlayerCount[0] ); + //Called in 30 secs with sound + schedule(30000, 0, "StatsUnbalanceSound"); + } } else {