From 0519dec33ac520b37ac64fd2d02bdad749b397f3 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sat, 27 May 2023 14:18:28 +0200 Subject: [PATCH] Fix #20083: Cannot use terrain surfaces with ID > 32 --- distribution/changelog.txt | 1 + src/openrct2/actions/SurfaceSetStyleAction.cpp | 12 ------------ src/openrct2/network/NetworkBase.cpp | 2 +- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 0a16bda8bf..3a51869eeb 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -6,6 +6,7 @@ - Change: [#20110] Fix a few RCT1 build height parity discrepancies. - Fix: [#6152] Camera and UI are no longer locked at 40 Hz, providing a smoother experience. - Fix: [#19823] Parkobj: disallow overriding objects of different object types. +- Fix: [#20083] Cannot use terrain surfaces with ID > 32 and terrain edges with ID > 16. - Fix: [#20111] All coaster types can access the new diagonal slope pieces. - Fix: [#20155] Fairground organ style 2 shows up as regular music, rather than for the merry-go-round. - Fix: [#20260] Ride locks up when inspecting/fixing staff member is fired. diff --git a/src/openrct2/actions/SurfaceSetStyleAction.cpp b/src/openrct2/actions/SurfaceSetStyleAction.cpp index 47e67d0a31..e71dfbc02c 100644 --- a/src/openrct2/actions/SurfaceSetStyleAction.cpp +++ b/src/openrct2/actions/SurfaceSetStyleAction.cpp @@ -50,12 +50,6 @@ GameActions::Result SurfaceSetStyleAction::Query() const auto& objManager = OpenRCT2::GetContext()->GetObjectManager(); if (_surfaceStyle != OBJECT_ENTRY_INDEX_NULL) { - if (_surfaceStyle > 0x1F) - { - LOG_ERROR("Invalid surface style."); - return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_LAND_TYPE, STR_NONE); - } - const auto surfaceObj = static_cast( objManager.GetLoadedObject(ObjectType::TerrainSurface, _surfaceStyle)); @@ -68,12 +62,6 @@ GameActions::Result SurfaceSetStyleAction::Query() const if (_edgeStyle != OBJECT_ENTRY_INDEX_NULL) { - if (_edgeStyle > 0xF) - { - LOG_ERROR("Invalid edge style."); - return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_LAND_TYPE, STR_NONE); - } - const auto edgeObj = static_cast(objManager.GetLoadedObject(ObjectType::TerrainEdge, _edgeStyle)); if (edgeObj == nullptr) diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index d06c2da9db..740b9a7239 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 "5" +#define NETWORK_STREAM_VERSION "6" #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION