From 4a3c2f4fb451ee526cbf27580719685d2ac5610a Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Tue, 8 Aug 2023 01:00:39 +0200 Subject: [PATCH] Fix #17666: Map edge glitches when using mountain near it --- distribution/changelog.txt | 1 + src/openrct2/actions/LandSetHeightAction.cpp | 8 +------- src/openrct2/network/NetworkBase.cpp | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 302ed18c90..51793b9fe8 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -9,6 +9,7 @@ - Change: [#20550] Change SEK conversion rate from 1 GBP to 0.1 GBP. - Fix: [#6152] Camera and UI are no longer locked at 40 Hz, providing a smoother experience. - Fix: [#9534] Screams no longer cut-off on steep diagonal drops. +- Fix: [#17666] Using the mountain tool near the edge of the map with clearance checks disabled causes visual glitches. - Fix: [#19450] The correct element is now auto-suggested when building a Medium Half Loop backwards. - Fix: [#19822] Tile inspector does not deep copy banners. - Fix: [#19823] Parkobj: disallow overriding objects of different object types. diff --git a/src/openrct2/actions/LandSetHeightAction.cpp b/src/openrct2/actions/LandSetHeightAction.cpp index 54f79054a2..63bdb6db0d 100644 --- a/src/openrct2/actions/LandSetHeightAction.cpp +++ b/src/openrct2/actions/LandSetHeightAction.cpp @@ -177,13 +177,7 @@ GameActions::Result LandSetHeightAction::Execute() const StringId LandSetHeightAction::CheckParameters() const { - if (!LocationValid(_coords)) - { - return STR_OFF_EDGE_OF_MAP; - } - - auto mapSizeMax = GetMapSizeMaxXY(); - if (_coords.x > mapSizeMax.x || _coords.y > mapSizeMax.y) + if (!LocationValid(_coords) || MapIsEdge(_coords)) { return STR_OFF_EDGE_OF_MAP; } diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index 3448995e5c..f53de48015 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -43,7 +43,7 @@ // It is used for making sure only compatible builds get connected, even within // single OpenRCT2 version. -#define NETWORK_STREAM_VERSION "15" +#define NETWORK_STREAM_VERSION "16" #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION