From 7253b92cfd11b01e52e0fd1f75c58c6d705a75a8 Mon Sep 17 00:00:00 2001 From: Duncan Date: Wed, 2 Jun 2021 21:30:49 +0100 Subject: [PATCH] Use correct function call for WallPlaceAction plugin visitor (#14806) * Use correct function call for WallPlaceAction plugin visitor * Increment plugin version * Update changelog --- distribution/changelog.txt | 1 + src/openrct2/actions/WallPlaceAction.cpp | 4 ++-- src/openrct2/scripting/ScriptEngine.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 3e5abb44bb..0208bbd933 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -26,6 +26,7 @@ - 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. +- Fix: [#14806] Incorrect function call in WallPlaceAction plugin code. - Improved: [#14511] “Unlock operating limits” cheat now also unlocks all music. - Improved: [#14712, #14716]: Improve startup times. diff --git a/src/openrct2/actions/WallPlaceAction.cpp b/src/openrct2/actions/WallPlaceAction.cpp index 7adaff2f90..09b3fdc30b 100644 --- a/src/openrct2/actions/WallPlaceAction.cpp +++ b/src/openrct2/actions/WallPlaceAction.cpp @@ -68,10 +68,10 @@ void WallPlaceAction::AcceptParameters(GameActionParameterVisitor& visitor) visitor.Visit("primaryColour", _primaryColour); visitor.Visit("secondaryColour", _secondaryColour); visitor.Visit("tertiaryColour", _tertiaryColour); - rct_scenery_entry* sceneryEntry = get_large_scenery_entry(_wallType); + rct_scenery_entry* sceneryEntry = get_wall_entry(_wallType); if (sceneryEntry != nullptr) { - if (sceneryEntry->large_scenery.scrolling_mode != SCROLLING_MODE_NONE) + if (sceneryEntry->wall.scrolling_mode != SCROLLING_MODE_NONE) { _bannerId = create_new_banner(0); } diff --git a/src/openrct2/scripting/ScriptEngine.h b/src/openrct2/scripting/ScriptEngine.h index c4f041aeae..3eebc71613 100644 --- a/src/openrct2/scripting/ScriptEngine.h +++ b/src/openrct2/scripting/ScriptEngine.h @@ -46,7 +46,7 @@ namespace OpenRCT2 namespace OpenRCT2::Scripting { - static constexpr int32_t OPENRCT2_PLUGIN_API_VERSION = 30; + static constexpr int32_t OPENRCT2_PLUGIN_API_VERSION = 31; # ifndef DISABLE_NETWORK class ScSocketBase;