Fixed a bug

Fixed a bug where the notification would go off between getcounts intervals even if someone switched, particularly at the last second.
This commit is contained in:
ChocoTaco 2019-01-12 13:56:06 -05:00
parent 8cab43f29b
commit 42ffe4602a

View file

@ -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
{