Added GetRandomMaps.cs Safety

This commit is contained in:
ChocoTaco 2019-02-19 17:59:19 -05:00
parent 84af2979d6
commit 816eb9661a
2 changed files with 7 additions and 1 deletions

View file

@ -2,6 +2,10 @@
//
//
//This file is present
//If this isnt present other things will crash
$GetRandomMapsLoaded = true;
//Map pool
//
//1-5

View file

@ -1,6 +1,8 @@
//To help decrease the chances of a repeated map in the map rotation by correcting repeated maps thru script
//$EvoCachedNextMission = "RoundTheMountain";
//
//$GetRandomMapsLoaded makes sure GetRandomMaps.cs is present
//MapRepetitionChecker can't funtion without it
//Run in GetTeamCounts.cs
function MapRepetitionChecker( %game )
@ -8,7 +10,7 @@ function MapRepetitionChecker( %game )
//Debug
//%MapRepetitionCheckerDebug = true;
if( $CurrentMissionType $= "CTF" && !$Host::TournamentMode && $MapRepetitionCheckerRunOnce !$= 1 )
if( $CurrentMissionType $= "CTF" && !$Host::TournamentMode && $MapRepetitionCheckerRunOnce !$= 1 && $GetRandomMapsLoaded )
{
if( $PreviousMission1back $= $EvoCachedNextMission || $PreviousMission2back $= $EvoCachedNextMission || $PreviousMission3back $= $EvoCachedNextMission || $PreviousMission4back $= $EvoCachedNextMission )
MapRepetitionCheckerFindRandom();