Better fix FlagSnatch bug

This commit is contained in:
ChocoTaco1 2020-11-18 13:00:12 -05:00
parent fa9e782d4a
commit 25f6a8f603

View file

@ -5,14 +5,11 @@
// //
// exec("scripts/autoexec/altWarmup.cs"); // exec("scripts/autoexec/altWarmup.cs");
// Dont touch this
$AW::DefaultWarmUpTime = $Host::warmupTime;
// Enable or Disable // Enable or Disable
$AW::EnableALTWarmUp = 1; $AW::EnableALTWarmUp = 1;
// The amount of time you want to allow for players to switch teams // Normal Warmup Time (In Seconds) - 20 is 20 Seconds
// In seconds - 60 is 60 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; $AW::ALTWarmUpTime = 60;
// Minimum Population to Activate // Minimum Population to Activate
$AW::MinALTWarmUpPop = 8; $AW::MinALTWarmUpPop = 8;
@ -23,7 +20,7 @@ package altWarmup
function DefaultGame::setupClientTeams(%game) function DefaultGame::setupClientTeams(%game)
{ {
$Host::warmupTime = $AW::DefaultWarmUpTime; $Host::warmupTime = $AW::DefaultWarmUpTime;
if($HostGamePlayerCount >= $AW::MinALTWarmUpPop && $AW::EnableALTWarmUp) if($HostGamePlayerCount >= $AW::MinALTWarmUpPop && $AW::EnableALTWarmUp && ($CurrentMissionType $= "CTF" || $CurrentMissionType $= "SCtF"))
{ {
%altWarmup = 1; %altWarmup = 1;
$Host::warmupTime = $AW::ALTWarmUpTime; $Host::warmupTime = $AW::ALTWarmUpTime;
@ -36,7 +33,6 @@ function DefaultGame::setupClientTeams(%game)
%client = ClientGroup.getObject(%i); %client = ClientGroup.getObject(%i);
//Put everyone in observer //Put everyone in observer
%client.team = 0;
%client.lastTeam = 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 // Prevent package from being activated if it is already