From 6a11dbf0c9b2cfa8fd4fbe6a80244f580fbe6e8b Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Sun, 7 Mar 2021 13:54:01 +0100 Subject: [PATCH] Fix #14247: Scenarios from RCT1 allow hiring too many staff --- distribution/changelog.txt | 1 + src/openrct2/rct1/S4Importer.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index c1afda516d..f508c65962 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -59,6 +59,7 @@ - Fix: [#13961] Animation for Guests sliding down Spiral Slide is missing on close zoom levels. - Fix: [#14012] 'Finish 5 roller coasters' goal is listed incorrectly in scenario selector. - Fix: [#14095] Holding down [-][+] buttons does not decrease/increase number of circuits. +- Fix: [#14247] Scenarios from RCT1 allow hiring too many staff. - Improved: [#6022] Allow up to 128 ride objects to be selected in track designer. - Improved: [#12917] Changed peep movement so that they stay more spread out over the full width of single tile paths. - Improved: [#13386] A GUI error message is now displayed if the language files are missing. diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index f42865e38b..39da1b9539 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1388,11 +1388,14 @@ private: } } - // The RCT2/OpenRCT2 structures are bigger than in RCT1, so set them to zero + // The RCT2/OpenRCT2 structures are bigger than in RCT1, so initialise them to zero std::fill(std::begin(gStaffModes), std::end(gStaffModes), StaffMode::None); std::fill(std::begin(gStaffPatrolAreas), std::end(gStaffPatrolAreas), 0); - std::fill(std::begin(_s4.staff_modes), std::end(_s4.staff_modes), 0); + for (int32_t i = 0; i < RCT1_MAX_STAFF; i++) + { + gStaffModes[i] = static_cast(_s4.staff_modes[i]); + } for (auto peep : EntityList(EntityListId::Peep)) {