1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Fix land tool clearance checks underneath maze track pieces

This commit is contained in:
mix
2025-10-19 22:01:43 +01:00
committed by GitHub
parent 5bf9bd1271
commit 198c3298e1
3 changed files with 6 additions and 3 deletions

View File

@@ -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)
------------------------------------------------------------------------

View File

@@ -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);

View File

@@ -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();