From 198c3298e1c8682df55f5937e7d810c843aa25b3 Mon Sep 17 00:00:00 2001 From: mix <167040362+mixiate@users.noreply.github.com> Date: Sun, 19 Oct 2025 22:01:43 +0100 Subject: [PATCH] Fix land tool clearance checks underneath maze track pieces --- distribution/changelog.txt | 1 + src/openrct2/network/NetworkBase.cpp | 2 +- src/openrct2/world/ConstructionClearance.cpp | 6 ++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 44cef4dd47..77698a5d4b 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -21,6 +21,7 @@ - Fix: [#25369] The Go-Karts medium turns and small flat and sloped turns do not block metal supports correctly. - Fix: [#25370] The Hybrid Coaster diagonal brakes and block brakes do not block metal supports consistently. - Fix: [#25371] The Wooden Roller Coaster small banked turns block too many metal supports. +- Fix: [#25378] The land tool sometimes allows land to be raised through a maze. 0.4.27 (2025-10-04) ------------------------------------------------------------------------ diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index cad46ba29e..ac7e74469a 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -47,7 +47,7 @@ // It is used for making sure only compatible builds get connected, even within // single OpenRCT2 version. -constexpr uint8_t kStreamVersion = 2; +constexpr uint8_t kStreamVersion = 3; const std::string kStreamID = std::string(kOpenRCT2Version) + "-" + std::to_string(kStreamVersion); diff --git a/src/openrct2/world/ConstructionClearance.cpp b/src/openrct2/world/ConstructionClearance.cpp index 396d8f985f..bafe549d3f 100644 --- a/src/openrct2/world/ConstructionClearance.cpp +++ b/src/openrct2/world/ConstructionClearance.cpp @@ -107,8 +107,10 @@ static bool MapLoc68BABCShouldContinue( const auto [slopeNorthZ, slopeEastZ, slopeSouthZ, slopeWestZ] = GetSlopeCornerHeights(pos.baseZ, slope); const TrackElement* const trackElement = tileElement->AsTrack(); - const auto& ted = OpenRCT2::TrackMetaData::GetTrackElementDescriptor(trackElement->GetTrackType()); - const auto& trackClearances = ted.sequences[trackElement->GetSequenceIndex()].clearance; + const TrackElemType trackElemType = trackElement->GetTrackType(); + const auto& ted = OpenRCT2::TrackMetaData::GetTrackElementDescriptor(trackElemType); + const uint8_t sequenceIndex = trackElemType == TrackElemType::Maze ? 0 : trackElement->GetSequenceIndex(); + const auto& trackClearances = ted.sequences[sequenceIndex].clearance; const auto trackQuarters = trackClearances.quarterTile.Rotate(trackElement->GetDirection()); const auto trackQuarterHeights = trackQuarters.GetQuarterHeights(trackElement->GetBaseZ()); const uint8_t trackOccupiedQuarters = trackQuarters.GetBaseQuarterOccupied();