mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-13 15:14:34 +00:00
Tweaks
This commit is contained in:
parent
8fea0232af
commit
33b3ef2a37
2 changed files with 15 additions and 16 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
// GetCounts was made to accurately keep track of how many players
|
// GetCounts was made to accurately keep track of how many players
|
||||||
// are on teams, on the server, on each team, spectator, etc.
|
// are on teams, on the server, on each team, spectator, etc.
|
||||||
// It runs every 5 seconds.
|
// It runs every 2.5 seconds.
|
||||||
// It has since evolved into the place to inject other services
|
// It has since evolved into the place to inject other services
|
||||||
// and aspects within the server.
|
// and aspects within the server.
|
||||||
//
|
//
|
||||||
|
|
@ -65,25 +65,25 @@ function GetTeamCounts( %game, %client, %respawn )
|
||||||
|
|
||||||
|
|
||||||
//Start Base Rape Notify
|
//Start Base Rape Notify
|
||||||
schedule(1000, 0, "NBRStatusNotify");
|
schedule(500, 0, "NBRStatusNotify");
|
||||||
//Call Team Balance Notify
|
//Start Team Balance Notify
|
||||||
schedule(2000, 0, "TeamBalanceNotify");
|
schedule(1000, 0, "TeamBalanceNotify");
|
||||||
//AntiCloak Start
|
//Start AntiCloak
|
||||||
schedule(3000, 0, "ActivateAntiCloak");
|
schedule(1500, 0, "ActivateAntiCloak");
|
||||||
|
|
||||||
//Set so counter wont run when it doesnt need to.
|
//Set so counter wont run when it doesnt need to.
|
||||||
$GetCountsClientTeamChange = false;
|
$GetCountsClientTeamChange = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Call itself again. Every 5 seconds.
|
//Call itself again. Every 2.5 seconds.
|
||||||
schedule(5000, 0, "GetTeamCounts");
|
schedule(2500, 0, "GetTeamCounts");
|
||||||
}
|
}
|
||||||
|
|
||||||
//Run at DefaultGame::clientJoinTeam, DefaultGame::clientChangeTeam, DefaultGame::assignClientTeam in evo defaultgame.ovl
|
//Run at DefaultGame::clientJoinTeam, DefaultGame::clientChangeTeam, DefaultGame::assignClientTeam in evo defaultgame.ovl
|
||||||
//Also Run at DefaultGame::onClientEnterObserverMode, DefaultGame::AIChangeTeam, DefaultGame::onClientLeaveGame, DefaultGame::forceObserver in evo defaultgame.ovl
|
//Also Run at DefaultGame::onClientEnterObserverMode, DefaultGame::AIChangeTeam, DefaultGame::onClientLeaveGame, DefaultGame::forceObserver in evo defaultgame.ovl
|
||||||
//And finally GameConnection::onConnect in evo server.ovl
|
//And finally GameConnection::onConnect in evo server.ovl
|
||||||
//Added so the bulk of GetCounts doesnt run when it doesnt need to causing unnecessary latency that may or may not have existed, but probably is good practice.
|
//Added so the bulk of GetCounts doesnt run when it doesnt need to causing unnecessary latency that may or may not have existed, but probably is good practice.
|
||||||
//GetCounts still runs every 5 seconds as it did, but whether or not someone has changed teams, joined obs, left, etc etc will decide whether or not the bulk of it runs.
|
//GetCounts still runs every 2.5 seconds as it did, but whether or not someone has changed teams, joined obs, left, etc etc will decide whether or not the bulk of it runs.
|
||||||
|
|
||||||
//Let GetTeamCounts run if there is a Teamchange.
|
//Let GetTeamCounts run if there is a Teamchange.
|
||||||
function ResetClientChangedTeams()
|
function ResetClientChangedTeams()
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,12 @@ function TeamBalanceNotify( %game, %client, %respawn )
|
||||||
$StatsBalancedSoundPlayed = 1;
|
$StatsBalancedSoundPlayed = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$UnbalancedMsgPlayed = 0;
|
||||||
|
$StatsMsgPlayed = 0;
|
||||||
|
$StatsBalancedSoundPlayed = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//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 !$= 1 )
|
else if( $PlayerCount[1] == $PlayerCount[2] && $TotalTeamPlayerCount !$= 0 && $BalancedMsgPlayed !$= 1 )
|
||||||
|
|
@ -85,11 +91,4 @@ function StatsUnbalanceSound()
|
||||||
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] );
|
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] );
|
||||||
schedule(30000, 0, "StatsUnbalanceSound");
|
schedule(30000, 0, "StatsUnbalanceSound");
|
||||||
}
|
}
|
||||||
else if( $PlayerCount[1] !$= $PlayerCount[2] )
|
|
||||||
{
|
|
||||||
$StatsBalancedSoundPlayed = 0;
|
|
||||||
$UnbalancedMsgPlayed = 0;
|
|
||||||
$StatsMsgPlayed = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue