1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Close #23018: Close windows before loading new game

This commit is contained in:
Michael Steenbeek
2024-10-23 20:33:37 +02:00
committed by GitHub
parent 1ff192b8a0
commit f4d2dadfe7
2 changed files with 6 additions and 1 deletions

View File

@@ -9,6 +9,7 @@
- Fix: [#22962] Fuzzy horizontal-to-vertical line transitions in charts.
- Fix: [#23009] Scenarios from RCT Classic (.sea files) are not included in the scenario index.
- Fix: [#23015] Crash when loading a save game when the construction window is still open.
- Fix: [#23018] Crash when loading a new game when the construction window is still open.
- Fix: [#23023] Large scenery clearance height interpreted as negative when greater than 127.
- Fix: [#23044] "remove_unused_objects" command causes blank peep names.

View File

@@ -622,7 +622,11 @@ static void GameLoadOrQuitNoSavePromptCallback(int32_t result, const utf8* path)
static void NewGameWindowCallback(const utf8* path)
{
WindowCloseByClass(WindowClass::EditorObjectSelection);
// Closing this will cause a Ride window to pop up, so we have to do this to ensure that
// no windows are open (besides the toolbars and LoadSave window).
WindowCloseByClass(WindowClass::RideConstruction);
WindowCloseAllExceptClass(WindowClass::Loadsave);
GameNotifyMapChange();
GetContext()->LoadParkFromFile(path, false, true);
GameLoadScripts();