From 68199396bd4920fca6d5e1a2bab2b454dd3272c5 Mon Sep 17 00:00:00 2001 From: Misa Date: Wed, 17 May 2023 12:12:36 -0700 Subject: [PATCH] Set custommode and custommodeforreal before loading level This fixes a bug where if a level errors upon loading, it wouldn't take you back to the levels list. --- desktop_version/src/Script.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/desktop_version/src/Script.cpp b/desktop_version/src/Script.cpp index 6b8de1a6..abe82949 100644 --- a/desktop_version/src/Script.cpp +++ b/desktop_version/src/Script.cpp @@ -2827,6 +2827,9 @@ void scriptclass::startgamemode(const enum StartMode mode) case Start_CUSTOM: case Start_CUSTOM_QUICKSAVE: { + map.custommodeforreal = true; + map.custommode = true; + std::string filename = std::string(cl.ListOfMetaData[game.playcustomlevel].filename); if (!cl.load(filename)) { @@ -2835,8 +2838,6 @@ void scriptclass::startgamemode(const enum StartMode mode) } cl.findstartpoint(); - map.custommodeforreal = true; - map.custommode = true; map.customshowmm = true; music.fadeout();