Reverted back to # variables

This commit is contained in:
ChocoTaco 2018-11-11 01:38:18 -05:00
parent 008f7789cc
commit 9b48e153c1
2 changed files with 23 additions and 20 deletions

View file

@ -4,23 +4,26 @@
//Notifys the user if NoBase rape is on or off. //Notifys the user if NoBase rape is on or off.
function NBRStatusNotify( %game, %client, %respawn ) function NBRStatusNotify( %game, %client, %respawn )
{ {
if( $CurrentMissionType $= "CTF" && $Host::EnableNoBaseRapeNotify ) if( $CurrentMissionType $= "CTF" && $Host::EnableNoBaseRapeNotify && !$Host::TournamentMode && $Host::EvoNoBaseRapeEnabled )
{ {
//echo ("%client " @ %client); //echo ("%client " @ %client);
//echo ("$TeamBalanceClient " @ $TeamBalanceClient); //echo ("$TeamBalanceClient " @ $TeamBalanceClient);
//On //On
if( !$Host::TournamentMode && $Host::EvoNoBaseRapeEnabled && $Host::EvoNoBaseRapeClassicPlayerCount > $TotalTeamPlayerCount && $NoBaseRapeNotifyCount ) if( $Host::EvoNoBaseRapeClassicPlayerCount > $TotalTeamPlayerCount )
{ {
if( $NoBaseRapeNotifyCount !$= 0 )
{
messageAll('MsgNoBaseRapeNotify', 'No Base Rape is \c1Enabled.~wfx/misc/nexus_cap.wav'); messageAll('MsgNoBaseRapeNotify', 'No Base Rape is \c1Enabled.~wfx/misc/nexus_cap.wav');
$NoBaseRapeNotifyCount = false; $NoBaseRapeNotifyCount = 0;
}
} }
//Off //Off
else if( !$NoBaseRapeNotifyCount ) else if( $NoBaseRapeNotifyCount !$= 1 )
{ {
messageAll('MsgNoBaseRapeNotify', 'No Base Rape is \c1Disabled.~wfx/misc/diagnostic_on.wav'); messageAll('MsgNoBaseRapeNotify', 'No Base Rape is \c1Disabled.~wfx/misc/diagnostic_on.wav');
$NoBaseRapeNotifyCount = true; $NoBaseRapeNotifyCount = 1;
} }
} }
} }

View file

@ -19,36 +19,36 @@ function TeamBalanceNotify::AtSpawn( %game, %client, %respawn )
if( $PlayerCount[1] !$= $PlayerCount[2] ) if( $PlayerCount[1] !$= $PlayerCount[2] )
{ {
//Uneven. Reset Balanced. //Uneven. Reset Balanced.
$BalancedMsgPlayed = false; $BalancedMsgPlayed = 0;
if( %Team1Difference >= 2 || %Team2Difference >= 2 ) if( %Team1Difference >= 2 || %Team2Difference >= 2 )
{ {
if( !$UnbalancedMsgPlayed && %Team2Difference == 2 || %Team1Difference == 2 ) if( $UnbalancedMsgPlayed !$= 1 && %Team2Difference == 2 || %Team1Difference == 2 )
{ {
messageAll('MsgTeamBalanceNotify', '\c1Teams are unbalanced.'); messageAll('MsgTeamBalanceNotify', '\c1Teams are unbalanced.');
//Once per cycle. //Once per cycle.
$UnbalancedMsgPlayed = true; $UnbalancedMsgPlayed = 1;
//Reset Stats. //Reset Stats.
$StatsMsgPlayed = false; $StatsMsgPlayed = 0;
} }
//Stats Aspect. 3 or more difference gets a stats notify. //Stats Aspect. 3 or more difference gets a stats notify.
else if( !$StatsMsgPlayed ) else if( $StatsMsgPlayed !$= 1)
{ {
messageAll('MsgTeamBalanceNotify', '\c1It is currently %1 vs %2 with %3 observers.', $PlayerCount[1], $PlayerCount[2], $PlayerCount[0] ); messageAll('MsgTeamBalanceNotify', '\c1It is currently %1 vs %2 with %3 observers.', $PlayerCount[1], $PlayerCount[2], $PlayerCount[0] );
$StatsMsgPlayed = true; $StatsMsgPlayed = 1;
} }
} }
} }
//If teams are balanced and teams dont equal 0. //If teams are balanced and teams dont equal 0.
else if( $PlayerCount[1] == $PlayerCount[2] && $TotalTeamPlayerCount !$= 0 && !$BalancedMsgPlayed ) else if( $PlayerCount[1] == $PlayerCount[2] && $TotalTeamPlayerCount !$= 0 && $BalancedMsgPlayed !$= 1 )
{ {
messageAll('MsgTeamBalanceNotify', '\c1Teams are balanced.'); messageAll('MsgTeamBalanceNotify', '\c1Teams are balanced.');
//Once per cycle. //Once per cycle.
$BalancedMsgPlayed = true; $BalancedMsgPlayed = 1;
//Reset unbalanced. //Reset unbalanced.
$UnbalancedMsgPlayed = false; $UnbalancedMsgPlayed = 0;
//Reset Stats. //Reset Stats.
$StatsMsgPlayed = false; $StatsMsgPlayed = 0;
} }
} }
} }
@ -57,8 +57,8 @@ function TeamBalanceNotify::AtSpawn( %game, %client, %respawn )
//Allows for another unbalanced notification everytime the flag is capped. //Allows for another unbalanced notification everytime the flag is capped.
function ResetUnbalancedNotifyPerCap() function ResetUnbalancedNotifyPerCap()
{ {
$UnbalancedMsgPlayed = false; $UnbalancedMsgPlayed = 0;
$StatsMsgPlayed = false; $StatsMsgPlayed = 0;
} }
//Reset Notify at defaultgame::gameOver in evo defaultgame.ovl //Reset Notify at defaultgame::gameOver in evo defaultgame.ovl