From cd86d3d7574b395307b99a041ed07c682ce63632 Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Thu, 30 Jul 2020 21:43:46 +0200 Subject: [PATCH] Fix #7969: Loading landscape resets money, inventions and objective (#12520) --- distribution/changelog.txt | 1 + src/openrct2/Editor.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index c608d54286..3a4c7a5823 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -25,6 +25,7 @@ - Fix: [#6119] Advertising campaign for ride window not updated properly (original bug). - Fix: [#7006] Submarine Ride is in the wrong research group. - Fix: [#7324] Research window shows vehicle name instead of ride name. +- Fix: [#7969, #8175, #12501] When loading a landscape in the Scenario Editor, the inventions list, financial settings and objective settings are reset. - Fix: [#10634] Guests are unable to use uphill paths out of toilets. - Fix: [#10876] When removing a path, its guest entry point is not removed. - Fix: [#10876] There can be multiple peep spawns on the same location. diff --git a/src/openrct2/Editor.cpp b/src/openrct2/Editor.cpp index ef3df0c42f..2e277c32d3 100644 --- a/src/openrct2/Editor.cpp +++ b/src/openrct2/Editor.cpp @@ -270,6 +270,7 @@ namespace Editor static bool ReadS6(const char* path) { auto extension = path_get_extension(path); + auto loadedFromSave = false; if (_stricmp(extension, ".sc6") == 0) { load_from_sc6(path); @@ -277,9 +278,10 @@ namespace Editor else if (_stricmp(extension, ".sv6") == 0 || _stricmp(extension, ".sv7") == 0) { load_from_sv6(path); + loadedFromSave = true; } - ClearMapForEditing(true); + ClearMapForEditing(loadedFromSave); gS6Info.editor_step = EDITOR_STEP_LANDSCAPE_EDITOR; gScreenAge = 0;