From fca0a40bf8fa2bda4195eb28a883fc424306498d Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 5 Oct 2006 23:14:38 +0000 Subject: [PATCH] fix comparing enum values with nil (invalid > all other enum values) --- stepmania/Themes/default/Scripts/Branches.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/Themes/default/Scripts/Branches.lua b/stepmania/Themes/default/Scripts/Branches.lua index 4a1d3f68d0..3261474400 100644 --- a/stepmania/Themes/default/Scripts/Branches.lua +++ b/stepmania/Themes/default/Scripts/Branches.lua @@ -131,7 +131,7 @@ end function SelectEndingScreen() local grade = STATSMAN:GetBestFinalGrade() - if GradeIndex[grade] >= GradeIndex["Grade_Tier03"] then return "ScreenMusicScroll" end + if Grade:Compare( grade, "Grade_Tier03" ) >= 0 then return "ScreenMusicScroll" end return "ScreenCredits" end @@ -184,7 +184,7 @@ local function ShowScreenInstructions() end for _,pn in ipairs(PlayerNumber) do - if DifficultyIndex[GAMESTATE:GetPreferredDifficulty(pn)] <= DifficultyIndex["Difficulty_Easy"] then + if Difficulty:Compare( GAMESTATE:GetPreferredDifficulty(pn), "Difficulty_Easy" ) <= 0 then return true end end