From 139baa29db1dc4eea41c3b66a361e168f87db740 Mon Sep 17 00:00:00 2001 From: ChocoTaco Date: Sat, 26 Jan 2019 10:44:11 -0500 Subject: [PATCH] Delayed Calls --- Classic/scripts/autoexec/GetTeamCounts.cs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Classic/scripts/autoexec/GetTeamCounts.cs b/Classic/scripts/autoexec/GetTeamCounts.cs index 873f99d..68c4b9b 100644 --- a/Classic/scripts/autoexec/GetTeamCounts.cs +++ b/Classic/scripts/autoexec/GetTeamCounts.cs @@ -65,17 +65,14 @@ function GetTeamCounts( %game, %client, %respawn ) //Start Base Rape Notify - NBRStatusNotify( %game, %client, %respawn ); - + schedule(1000, 0, "NBRStatusNotify"); //Call Team Balance Notify - TeamBalanceNotify( %game, %client, %respawn ); - - //AntiCloak Start - ActivateAntiCloak(); - + schedule(2000, 0, "TeamBalanceNotify"); + //AntiCloak Start + schedule(3000, 0, "ActivateAntiCloak"); + //Set so counter wont run when it doesnt need to. $GetCountsClientTeamChange = false; - } //Call itself again. Every 5 seconds. @@ -84,7 +81,7 @@ function GetTeamCounts( %game, %client, %respawn ) //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 -//And finally GameConnection::onConnect in evo server.ovl and CTFGame::flagCap in evo CTFGame.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. //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.