From 0ea5f343afd7f163c2b97e97d2edd6a3605640f5 Mon Sep 17 00:00:00 2001 From: Rik Smeets <30838294+rik-smeets@users.noreply.github.com> Date: Wed, 23 Nov 2022 20:02:34 +0100 Subject: [PATCH] Fix #18469: Land rights window issues (#18662) Global variables regarding land ownership weren't initialized upon loading a .park file. This would lead to different bugs when using the 'Land rights' window, like markers remaining visible indefinitely and not being able to select the type of land rights to buy. --- distribution/changelog.txt | 1 + src/openrct2/Game.cpp | 2 ++ src/openrct2/rct1/S4Importer.cpp | 1 - src/openrct2/rct2/S6Importer.cpp | 1 - 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 13fdb6a0c5..1325a2d26f 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -41,6 +41,7 @@ - Fix: [#18442] About window background is clickable. - Fix: [#18449] [Plugin] Change type of listview widgets from 'scroll_view' to 'listview'. - Fix: [#18453] Slow walking guests don't get across level crossings in time. +- Fix: [#18469] Land rights window buttons incorrectly disabled and markers remain visible indefinitely. - Fix: [#18459] ‘Highlight path issues’ hides fences for paths with additions. - Fix: [#18606] JSON objects do not take priority over the DAT files they supersede. - Fix: [#18620] [Plugin] Crash when reading widget properties from windows that have both static and tab widgets. diff --git a/src/openrct2/Game.cpp b/src/openrct2/Game.cpp index 9f44f8e555..a3c70d1546 100644 --- a/src/openrct2/Game.cpp +++ b/src/openrct2/Game.cpp @@ -453,6 +453,8 @@ void game_fix_save_vars() ParkEntranceFixLocations(); UpdateConsolidatedPatrolAreas(); + + MapCountRemainingLandRights(); } void game_load_init() diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index fabaf62e5f..7496e1228f 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -196,7 +196,6 @@ namespace RCT1 SetDefaultNames(); determine_ride_entrance_and_exit_locations(); - MapCountRemainingLandRights(); research_determine_first_of_type(); CheatsReset(); diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 18e5399145..3d0a27d4ba 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -501,7 +501,6 @@ namespace RCT2 // Fix and set dynamic variables MapStripGhostFlagFromElements(); ConvertScenarioStringsToUTF8(); - MapCountRemainingLandRights(); determine_ride_entrance_and_exit_locations(); park.Name = GetUserString(_s6.park_name);