mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-01-19 16:14:44 +00:00
Switched to true/false
This commit is contained in:
parent
7755d719e2
commit
008f7789cc
|
|
@ -10,20 +10,27 @@ function NBRStatusNotify( %game, %client, %respawn )
|
|||
//echo ("$TeamBalanceClient " @ $TeamBalanceClient);
|
||||
|
||||
//On
|
||||
if( !$Host::TournamentMode && $Host::EvoNoBaseRapeEnabled && $Host::EvoNoBaseRapeClassicPlayerCount > $TotalTeamPlayerCount && $NoBaseRapeNotifyCount !$= 0 )
|
||||
if( !$Host::TournamentMode && $Host::EvoNoBaseRapeEnabled && $Host::EvoNoBaseRapeClassicPlayerCount > $TotalTeamPlayerCount && $NoBaseRapeNotifyCount )
|
||||
{
|
||||
messageAll('MsgNoBaseRapeNotify', 'No Base Rape is \c1Enabled.~wfx/misc/nexus_cap.wav');
|
||||
$NoBaseRapeNotifyCount = 0;
|
||||
$NoBaseRapeNotifyCount = false;
|
||||
}
|
||||
//Off
|
||||
else if( $NoBaseRapeNotifyCount !$= 1 )
|
||||
else if( !$NoBaseRapeNotifyCount )
|
||||
{
|
||||
messageAll('MsgNoBaseRapeNotify', 'No Base Rape is \c1Disabled.~wfx/misc/diagnostic_on.wav');
|
||||
$NoBaseRapeNotifyCount = 1;
|
||||
$NoBaseRapeNotifyCount = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//This function is at DefaultGame::gameOver(%game) CTFGame.cs
|
||||
//Resets the client NotifyCount when the mission ends
|
||||
function ResetNBRNotify()
|
||||
{
|
||||
$NoBaseRapeNotifyCount = -1;
|
||||
}
|
||||
|
||||
//This function is at StaticShapeData::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType)
|
||||
//In the staticshape.ovl in evoClassic.vl2
|
||||
//Plays a sound when a player hits a protected asset
|
||||
|
|
@ -32,11 +39,4 @@ function NBRAssetSound( %game, %sourceObject )
|
|||
messageClient(%sourceObject.client, 'MsgNoBaseRapeNotify', '~wfx/misc/diagnostic_beep.wav');
|
||||
}
|
||||
|
||||
//This function is at DefaultGame::gameOver(%game) CTFGame.cs
|
||||
//Resets the client NotifyCount when the mission ends
|
||||
function ResetNBRNotify()
|
||||
{
|
||||
$NoBaseRapeNotifyCount = -1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,36 +19,36 @@ function TeamBalanceNotify::AtSpawn( %game, %client, %respawn )
|
|||
if( $PlayerCount[1] !$= $PlayerCount[2] )
|
||||
{
|
||||
//Uneven. Reset Balanced.
|
||||
$BalancedMsgPlayed = 0;
|
||||
$BalancedMsgPlayed = false;
|
||||
|
||||
if( %Team1Difference >= 2 || %Team2Difference >= 2 )
|
||||
{
|
||||
if( $UnbalancedMsgPlayed !$= 1 && %Team2Difference == 2 || %Team1Difference == 2 )
|
||||
if( !$UnbalancedMsgPlayed && %Team2Difference == 2 || %Team1Difference == 2 )
|
||||
{
|
||||
messageAll('MsgTeamBalanceNotify', '\c1Teams are unbalanced.');
|
||||
//Once per cycle
|
||||
$UnbalancedMsgPlayed = 1;
|
||||
//Once per cycle.
|
||||
$UnbalancedMsgPlayed = true;
|
||||
//Reset Stats.
|
||||
$StatsMsgPlayed = 0;
|
||||
$StatsMsgPlayed = false;
|
||||
}
|
||||
//Stats Aspect. 3 or more difference gets a stats notify.
|
||||
else if( $StatsMsgPlayed !$= 1 )
|
||||
else if( !$StatsMsgPlayed )
|
||||
{
|
||||
messageAll('MsgTeamBalanceNotify', '\c1It is currently %1 vs %2 with %3 observers.', $PlayerCount[1], $PlayerCount[2], $PlayerCount[0] );
|
||||
$StatsMsgPlayed = 1;
|
||||
$StatsMsgPlayed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
//If teams are balanced and teams dont equal 0.
|
||||
else if( $PlayerCount[1] == $PlayerCount[2] && $TotalTeamPlayerCount !$= 0 && $BalancedMsgPlayed !$= 1 )
|
||||
else if( $PlayerCount[1] == $PlayerCount[2] && $TotalTeamPlayerCount !$= 0 && !$BalancedMsgPlayed )
|
||||
{
|
||||
messageAll('MsgTeamBalanceNotify', '\c1Teams are balanced.');
|
||||
//Once per cycle.
|
||||
$BalancedMsgPlayed = 1;
|
||||
$BalancedMsgPlayed = true;
|
||||
//Reset unbalanced.
|
||||
$UnbalancedMsgPlayed = 0;
|
||||
$UnbalancedMsgPlayed = false;
|
||||
//Reset Stats.
|
||||
$StatsMsgPlayed = 0;
|
||||
$StatsMsgPlayed = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -57,8 +57,8 @@ function TeamBalanceNotify::AtSpawn( %game, %client, %respawn )
|
|||
//Allows for another unbalanced notification everytime the flag is capped.
|
||||
function ResetUnbalancedNotifyPerCap()
|
||||
{
|
||||
$UnbalancedMsgPlayed = 0;
|
||||
$StatsMsgPlayed = 0;
|
||||
$UnbalancedMsgPlayed = false;
|
||||
$StatsMsgPlayed = false;
|
||||
}
|
||||
|
||||
//Reset Notify at defaultgame::gameOver in evo defaultgame.ovl
|
||||
|
|
|
|||
Loading…
Reference in a new issue