From 816eb9661a7e58e3483ee4debf05141304e4853b Mon Sep 17 00:00:00 2001 From: ChocoTaco Date: Tue, 19 Feb 2019 17:59:19 -0500 Subject: [PATCH] Added GetRandomMaps.cs Safety --- Classic/scripts/autoexec/GetRandomMaps.cs | 4 ++++ Classic/scripts/autoexec/MapRepetitionChecker.cs | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Classic/scripts/autoexec/GetRandomMaps.cs b/Classic/scripts/autoexec/GetRandomMaps.cs index cc12f77..84a7306 100644 --- a/Classic/scripts/autoexec/GetRandomMaps.cs +++ b/Classic/scripts/autoexec/GetRandomMaps.cs @@ -2,6 +2,10 @@ // // +//This file is present +//If this isnt present other things will crash +$GetRandomMapsLoaded = true; + //Map pool // //1-5 diff --git a/Classic/scripts/autoexec/MapRepetitionChecker.cs b/Classic/scripts/autoexec/MapRepetitionChecker.cs index 413a712..799aaf4 100644 --- a/Classic/scripts/autoexec/MapRepetitionChecker.cs +++ b/Classic/scripts/autoexec/MapRepetitionChecker.cs @@ -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();