No Change to Def WarmupTime if Disabled

Allow switching before match even when disabled
This commit is contained in:
ChocoTaco1 2020-11-20 16:15:43 -05:00
parent d97261b5b8
commit 6281639e80

View file

@ -19,9 +19,12 @@ package altWarmup
function DefaultGame::setupClientTeams(%game) function DefaultGame::setupClientTeams(%game)
{ {
$Host::warmupTime = $AW::DefaultWarmUpTime; if($AW::EnableALTWarmUp)
if($HostGamePlayerCount >= $AW::MinALTWarmUpPop && $AW::EnableALTWarmUp && ($CurrentMissionType $= "CTF" || $CurrentMissionType $= "SCtF")) {
%altWarmup = 1; $Host::warmupTime = $AW::DefaultWarmUpTime;
if($HostGamePlayerCount >= $AW::MinALTWarmUpPop && ($CurrentMissionType $= "CTF" || $CurrentMissionType $= "SCtF"))
%altWarmup = 1;
}
if(%altWarmup) if(%altWarmup)
{ {
@ -60,7 +63,7 @@ function serverCmdClientJoinTeam(%client, %team, %admin)
{ {
if(%client.team != %team) if(%client.team != %team)
{ {
if(!$MatchStarted && $AW::EnableALTWarmUp) if(!$MatchStarted)
{ {
if(!%client.waitStart || (getSimTime() - %client.waitStart) > 5000 || %client.isAdmin) if(!%client.waitStart || (getSimTime() - %client.waitStart) > 5000 || %client.isAdmin)
{ {