diff --git a/Classic/scripts/autoexec/GetTeamCounts.cs b/Classic/scripts/autoexec/GetTeamCounts.cs index e5a3d6a..7a66c67 100644 --- a/Classic/scripts/autoexec/GetTeamCounts.cs +++ b/Classic/scripts/autoexec/GetTeamCounts.cs @@ -31,10 +31,7 @@ if (!isActivePackage(StartTeamCounts)) activatePackage(StartTeamCounts); function GetTeamCounts( %game, %client, %respawn ) -{ - //Run MissionTypeOptions - MissionTypeOptions(); - +{ //Get teamcounts if( $GetCountsClientTeamChange && $countdownStarted && $MatchStarted ) { diff --git a/Classic/scripts/autoexec/MissionTypeOptions.cs b/Classic/scripts/autoexec/MissionTypeOptions.cs index 7032ce8..6b9cefb 100644 --- a/Classic/scripts/autoexec/MissionTypeOptions.cs +++ b/Classic/scripts/autoexec/MissionTypeOptions.cs @@ -10,35 +10,50 @@ // $Host::PUGPassword = "pickup"; // +package MissionTypeOptions +{ + +function loadMissionStage2() +{ + //Run MissionTypeOptions + MissionTypeOptions(); + + parent::loadMissionStage2(); +} + +}; + +// Prevent package from being activated if it is already +if (!isActivePackage(MissionTypeOptions)) + activatePackage(MissionTypeOptions); + + + function MissionTypeOptions() { - //Only run before mission start and countdown start - if( !$MatchStarted && !$countdownStarted ) + if( $CurrentMissionType !$= "LakRabbit" ) { - if( $CurrentMissionType !$= "LakRabbit" ) - { - if( $Host::TournamentMode && $Host::PUGautoPassword ) - - $Host::Password = $Host::PUGPassword; - - else if( !$Host::TournamentMode ) - { - $Host::Password = ""; - } - - $Host::HiVisibility = "0"; - } - else if( $CurrentMissionType $= "LakRabbit" ) + if( $Host::TournamentMode && $Host::PUGautoPassword ) + + $Host::Password = $Host::PUGPassword; + + else if( !$Host::TournamentMode ) { $Host::Password = ""; - $Host::TournamentMode = 0; - - $Host::HiVisibility = "1"; } - //For zCheckVar.cs TournyNetClient - if( $CurrentMissionType !$= "CTF" && $CheckVerObserverRunOnce ) - CheckVerObserverReset(); - //echo ("PUGpassCheck"); + $Host::HiVisibility = "0"; } + else if( $CurrentMissionType $= "LakRabbit" ) + { + $Host::Password = ""; + $Host::TournamentMode = 0; + + $Host::HiVisibility = "1"; + } + //For zCheckVar.cs TournyNetClient + if( $CurrentMissionType !$= "CTF" && $CheckVerObserverRunOnce ) + CheckVerObserverReset(); + + //echo ("PUGpassCheck"); } \ No newline at end of file