From 43a98680ac7e196888097ba349180e4e58cc523e Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Sun, 3 Jul 2022 16:39:27 +0200 Subject: [PATCH] Fix: Fallback when selecting RCT1 titles while it's not installed --- src/openrct2-ui/title/TitleSequencePlayer.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/openrct2-ui/title/TitleSequencePlayer.cpp b/src/openrct2-ui/title/TitleSequencePlayer.cpp index cde1ca3c7a..c787687515 100644 --- a/src/openrct2-ui/title/TitleSequencePlayer.cpp +++ b/src/openrct2-ui/title/TitleSequencePlayer.cpp @@ -161,22 +161,32 @@ namespace OpenRCT2::Title if (!loadSuccess) { - auto message = std::string("Failed to load: \"") + scenarioName + " for the title sequence."; + auto message = std::string("Failed to load: \"") + scenarioName + "\" for the title sequence."; throw std::domain_error(message); } game_notify_map_changed(); } + + IncrementPosition(); } catch (std::exception& e) { const char* commandName = std::visit( [](auto&& command) { return std::decay_t::Name; }, currentCommand); Console::Error::WriteLine("%s (command %i) failed with error: %s", commandName, _position, e.what()); - Console::Error::WriteLine(" Skipping to the next command."); - } - IncrementPosition(); + if (TitleSequenceIsLoadCommand(currentCommand)) + { + Console::Error::WriteLine(" Skipping to the next load command."); + SkipToNextLoadCommand(); + } + else + { + Console::Error::WriteLine(" Skipping to the next command."); + IncrementPosition(); + } + } if (_position == entryPosition) {