From 060a9afaaea7d0e52170741b033cff8880406da3 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Mon, 18 Apr 2022 18:26:07 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Fix=20#17009:=20=E2=80=9CNo=20money?= =?UTF-8?q?=E2=80=9D=20flag=20in=20SV6=20saves=20not=20imported=20correctl?= =?UTF-8?q?y?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/openrct2/rct2/S6Importer.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 0f7bbb9c2a..a763add24c 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -256,10 +256,13 @@ namespace RCT2 gParkFlags = _s6.park_flags & ~PARK_FLAGS_NO_MONEY_SCENARIO; // RCT2 used a different flag for `no money` when the park is a scenario - if (_s6.header.type == S6_TYPE_SCENARIO && (_s6.park_flags & PARK_FLAGS_NO_MONEY_SCENARIO)) - gParkFlags |= PARK_FLAGS_NO_MONEY; - else - gParkFlags &= ~PARK_FLAGS_NO_MONEY; + if (_s6.header.type == S6_TYPE_SCENARIO) + { + if (_s6.park_flags & PARK_FLAGS_NO_MONEY_SCENARIO) + gParkFlags |= PARK_FLAGS_NO_MONEY; + else + gParkFlags &= ~PARK_FLAGS_NO_MONEY; + } gParkEntranceFee = _s6.park_entrance_fee; // rct1_park_entrance_x From d71f7a7697db67171bbf12d94227b19ba833fbdd Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Mon, 18 Apr 2022 18:28:00 +0200 Subject: [PATCH 2/2] Remove now-redundant code for importing RCT1 saves with no money --- src/openrct2/rct1/S4Importer.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 6180fb1562..689dff2a95 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -2206,11 +2206,6 @@ namespace RCT1 gParkFlags |= PARK_FLAGS_UNLOCK_ALL_PRICES; } - if (_s4.park_flags & RCT1_PARK_FLAGS_NO_MONEY) - { - gParkFlags |= PARK_FLAGS_NO_MONEY; - } - gParkSize = _s4.park_size; gTotalRideValueForMoney = _s4.total_ride_value_for_money; gSamePriceThroughoutPark = 0;