From 219a4e6cca33b893ee8fede0878892a6c314a60a Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Tue, 9 Feb 2021 11:12:47 -0500 Subject: [PATCH] Added Tourney check --- .../scripts/autoexec/AntiLouExploitFixes.cs | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Classic/scripts/autoexec/AntiLouExploitFixes.cs b/Classic/scripts/autoexec/AntiLouExploitFixes.cs index 9191ba0..79a0a27 100644 --- a/Classic/scripts/autoexec/AntiLouExploitFixes.cs +++ b/Classic/scripts/autoexec/AntiLouExploitFixes.cs @@ -109,9 +109,11 @@ function resetBuyVehicle(%client) // Info: Delay on calculating flag stats function ShapeBase::throwObject(%this,%obj) { + //------------------------------------------------------------------ // z0dd - ZOD, 4/15/02. Allow respawn switching during tourney wait. - if(!$MatchStarted) - return; + if(!$MatchStarted && $Host::TournamentMode) //Added Tourney check + return; + //------------------------------------------------------------------ // z0dd - ZOD, 5/26/02. Remove anti-hover so flag can be thrown properly if(%obj.getDataBlock().getName() $= "Flag") @@ -121,9 +123,9 @@ function ShapeBase::throwObject(%this,%obj) if(Game.Class $= CTFGame || Game.Class $= PracticeCTFGame || Game.Class $= SCtFGame) %obj.searchSchedule = Game.schedule(10, "startFlagCollisionSearch", %obj); } - - %srcCorpse = (%this.getState() $= "Dead"); // z0dd - ZOD, 4/14/02. Flag tossed from corpse + //------------------------------------------------------------------ + %srcCorpse = (%this.getState() $= "Dead"); // z0dd - ZOD, 4/14/02. Flag tossed from corpse //if the object is being thrown by a corpse, use a random vector if (%srcCorpse && %obj.getDataBlock().getName() !$= "Flag") // z0dd - ZOD, 4/14/02. Except for flags.. { @@ -151,14 +153,16 @@ function ShapeBase::throwObject(%this,%obj) if (%obj.getDataBlock().getName() $= "Flag") { %vec = vectorScale(%vec, (%srcCorpse ? 40 : 75)); // z0dd - ZOD, 4/14/02. Throw flag force. Value was 40 - + // ------------------------------------------------------------ // z0dd - ZOD, 9/27/02. Delay on grabbing flag after tossing it %this.flagTossWait = true; %this.schedule(1000, resetFlagTossWait); - + // ------------------------------------------------------------ + // Delay on calculating stats %this.flagStatsWait = true; - %this.schedule(5000, resetFlagStatsWait); + %this.schedule(5000, resetFlagStatsWait); + // ------------------------------------------------------------ } // @@ -167,7 +171,7 @@ function ShapeBase::throwObject(%this,%obj) %obj.setCollisionTimeout(%this); %data = %obj.getDatablock(); - %data.onThrow(%obj, %this); + %data.onThrow(%obj,%this); //call the AI hook AIThrowObject(%obj);