From 21bb949322feee37db5bc4e3a4bdbccf2d2008ea Mon Sep 17 00:00:00 2001 From: Duncan Date: Fri, 28 May 2021 18:55:19 +0100 Subject: [PATCH] Fix 14774: Scenery research always unlocks on load (#14777) * Fix #14774: Incorrect import of scenery research Mistake during a refactor caused all scenery to be imported as already researched. * Update changelog * Update network version --- distribution/changelog.txt | 1 + src/openrct2/management/Research.cpp | 2 +- src/openrct2/network/NetworkBase.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index d0c18b7646..3e5abb44bb 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -25,6 +25,7 @@ - Fix: [#14682] Crash when painting Swinging Ships with invalid subtype. - Fix: [#14707] Crash when window is closed during text input. - Fix: [#14710] Ride/Track Design preview does not show if it costs more money than available. +- Fix: [#14774] Incorrect import of scenery research caused all scenery to be unlocked. - Improved: [#14511] “Unlock operating limits” cheat now also unlocks all music. - Improved: [#14712, #14716]: Improve startup times. diff --git a/src/openrct2/management/Research.cpp b/src/openrct2/management/Research.cpp index f17a5877b8..8aaf119e70 100644 --- a/src/openrct2/management/Research.cpp +++ b/src/openrct2/management/Research.cpp @@ -657,7 +657,7 @@ void set_all_scenery_items_not_invented() { for (auto sceneryType = 0; sceneryType < SCENERY_TYPE_COUNT; sceneryType++) { - std::fill(std::begin(_researchedSceneryItems[sceneryType]), std::end(_researchedSceneryItems[sceneryType]), true); + std::fill(std::begin(_researchedSceneryItems[sceneryType]), std::end(_researchedSceneryItems[sceneryType]), false); } } diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index 76fa8088b9..67513a98ac 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -36,7 +36,7 @@ // This string specifies which version of network stream current build uses. // It is used for making sure only compatible builds get connected, even within // single OpenRCT2 version. -#define NETWORK_STREAM_VERSION "16" +#define NETWORK_STREAM_VERSION "17" #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION static Peep* _pickup_peep = nullptr;