From 25f6a8f603706546e93f3d98f909a4e22a3ddc85 Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Wed, 18 Nov 2020 13:00:12 -0500 Subject: [PATCH] Better fix FlagSnatch bug --- Classic/scripts/autoexec/altWarmup.cs | 30 ++++----------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/Classic/scripts/autoexec/altWarmup.cs b/Classic/scripts/autoexec/altWarmup.cs index 62d57be..c4864a8 100644 --- a/Classic/scripts/autoexec/altWarmup.cs +++ b/Classic/scripts/autoexec/altWarmup.cs @@ -5,14 +5,11 @@ // // exec("scripts/autoexec/altWarmup.cs"); -// Dont touch this -$AW::DefaultWarmUpTime = $Host::warmupTime; - - // Enable or Disable $AW::EnableALTWarmUp = 1; -// The amount of time you want to allow for players to switch teams -// In seconds - 60 is 60 seconds +// Normal Warmup Time (In Seconds) - 20 is 20 Seconds +$AW::DefaultWarmUpTime = 20 +// The amount of time you want to allow for players to switch teams (In seconds) - 60 is 60 seconds $AW::ALTWarmUpTime = 60; // Minimum Population to Activate $AW::MinALTWarmUpPop = 8; @@ -23,7 +20,7 @@ package altWarmup function DefaultGame::setupClientTeams(%game) { $Host::warmupTime = $AW::DefaultWarmUpTime; - if($HostGamePlayerCount >= $AW::MinALTWarmUpPop && $AW::EnableALTWarmUp) + if($HostGamePlayerCount >= $AW::MinALTWarmUpPop && $AW::EnableALTWarmUp && ($CurrentMissionType $= "CTF" || $CurrentMissionType $= "SCtF")) { %altWarmup = 1; $Host::warmupTime = $AW::ALTWarmUpTime; @@ -36,7 +33,6 @@ function DefaultGame::setupClientTeams(%game) %client = ClientGroup.getObject(%i); //Put everyone in observer - %client.team = 0; %client.lastTeam = 0; } } @@ -119,24 +115,6 @@ function serverCmdClientJoinTeam(%client, %team, %admin) } } - -// So flag snatch sound wont play at the end of the match -function CTFGame::playerTouchEnemyFlag(%game, %player, %flag) -{ - if(!$missionRunning) - return; - - parent::playerTouchEnemyFlag(%game, %player, %flag); -} - -function SCtFGame::playerTouchEnemyFlag(%game, %player, %flag) -{ - if(!$missionRunning) - return; - - parent::playerTouchEnemyFlag(%game, %player, %flag); -} - }; // Prevent package from being activated if it is already