Added Tourney check

This commit is contained in:
ChocoTaco1 2021-02-09 11:12:47 -05:00
parent 2dd032d856
commit 219a4e6cca

View file

@ -109,9 +109,11 @@ function resetBuyVehicle(%client)
// Info: Delay on calculating flag stats // Info: Delay on calculating flag stats
function ShapeBase::throwObject(%this,%obj) function ShapeBase::throwObject(%this,%obj)
{ {
//------------------------------------------------------------------
// z0dd - ZOD, 4/15/02. Allow respawn switching during tourney wait. // z0dd - ZOD, 4/15/02. Allow respawn switching during tourney wait.
if(!$MatchStarted) if(!$MatchStarted && $Host::TournamentMode) //Added Tourney check
return; return;
//------------------------------------------------------------------
// z0dd - ZOD, 5/26/02. Remove anti-hover so flag can be thrown properly // z0dd - ZOD, 5/26/02. Remove anti-hover so flag can be thrown properly
if(%obj.getDataBlock().getName() $= "Flag") if(%obj.getDataBlock().getName() $= "Flag")
@ -121,9 +123,9 @@ function ShapeBase::throwObject(%this,%obj)
if(Game.Class $= CTFGame || Game.Class $= PracticeCTFGame || Game.Class $= SCtFGame) if(Game.Class $= CTFGame || Game.Class $= PracticeCTFGame || Game.Class $= SCtFGame)
%obj.searchSchedule = Game.schedule(10, "startFlagCollisionSearch", %obj); %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 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.. 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") if (%obj.getDataBlock().getName() $= "Flag")
{ {
%vec = vectorScale(%vec, (%srcCorpse ? 40 : 75)); // z0dd - ZOD, 4/14/02. Throw flag force. Value was 40 %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 // z0dd - ZOD, 9/27/02. Delay on grabbing flag after tossing it
%this.flagTossWait = true; %this.flagTossWait = true;
%this.schedule(1000, resetFlagTossWait); %this.schedule(1000, resetFlagTossWait);
// ------------------------------------------------------------
// Delay on calculating stats // Delay on calculating stats
%this.flagStatsWait = true; %this.flagStatsWait = true;
%this.schedule(5000, resetFlagStatsWait); %this.schedule(5000, resetFlagStatsWait);
// ------------------------------------------------------------
} }
// //
@ -167,7 +171,7 @@ function ShapeBase::throwObject(%this,%obj)
%obj.setCollisionTimeout(%this); %obj.setCollisionTimeout(%this);
%data = %obj.getDatablock(); %data = %obj.getDatablock();
%data.onThrow(%obj, %this); %data.onThrow(%obj,%this);
//call the AI hook //call the AI hook
AIThrowObject(%obj); AIThrowObject(%obj);