From 90b6cdb62ede5372ce265a87ad6d3fabcce15656 Mon Sep 17 00:00:00 2001 From: Yuvraj Tetarwal <69211421+YuviTz1@users.noreply.github.com> Date: Tue, 6 Sep 2022 02:19:16 +0530 Subject: [PATCH] Fix #17904: Trees are removed at no cost to make way for ride entrance/exits --- distribution/changelog.txt | 1 + src/openrct2/actions/RideEntranceExitPlaceAction.cpp | 3 +++ src/openrct2/network/NetworkBase.cpp | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 8691b96cc2..c0efc3a3b9 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -54,6 +54,7 @@ - Fix: [#17834] Finance window becomes blank after 4096 years. - Fix: [#17816] Option to pause game when Steam Overlay is active is not greyed out when using the OpenGL renderer. - Fix: [#17897] Guest can get stuck on tiles with construction rights outside the park. +- Fix: [#17904] Trees are removed at no cost to make way for ride entrance/exits. - Fix: [#17905] The chain button in the map window is enabled for rectangular maps when (re)opened. - Fix: [#17931] The in-game command ‘count_objects’ crashes the game. - Fix: [#17865] With difficult guest generation, tested but unopened rides still contribute to the guest cap. diff --git a/src/openrct2/actions/RideEntranceExitPlaceAction.cpp b/src/openrct2/actions/RideEntranceExitPlaceAction.cpp index 392368957d..cbac488492 100644 --- a/src/openrct2/actions/RideEntranceExitPlaceAction.cpp +++ b/src/openrct2/actions/RideEntranceExitPlaceAction.cpp @@ -124,6 +124,7 @@ GameActions::Result RideEntranceExitPlaceAction::Query() const auto res = GameActions::Result(); res.Position = { _loc.ToTileCentre(), z }; res.Expenditure = ExpenditureType::RideConstruction; + res.Cost += canBuild.Cost; return res; } @@ -180,6 +181,7 @@ GameActions::Result RideEntranceExitPlaceAction::Execute() const auto res = GameActions::Result(); res.Position = { _loc.ToTileCentre(), z }; res.Expenditure = ExpenditureType::RideConstruction; + res.Cost += canBuild.Cost; auto* entranceElement = TileElementInsert(CoordsXYZ{ _loc, z }, 0b1111); Guard::Assert(entranceElement != nullptr); @@ -255,5 +257,6 @@ GameActions::Result RideEntranceExitPlaceAction::TrackPlaceQuery(const CoordsXYZ auto res = GameActions::Result(); res.Position = { loc.ToTileCentre(), tile_element_height(loc) }; res.Expenditure = ExpenditureType::RideConstruction; + res.Cost += canBuild.Cost; return res; } diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index 9665f1fab2..715122ae36 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -42,7 +42,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 "12" +#define NETWORK_STREAM_VERSION "13" #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION static Peep* _pickup_peep = nullptr;