1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00

Fix #11804: Some RCT1 fences are imported at the wrong height

This commit is contained in:
Michael Steenbeek
2020-07-25 16:58:22 +02:00
committed by GitHub
parent b53da7d8d4
commit b70716d5f6
2 changed files with 16 additions and 3 deletions

View File

@@ -40,6 +40,7 @@
- Fix: [#11640] Objects with a blank description in one language do not fall back to other languages anymore.
- Fix: [#11676] Spiral Roller Coaster has regular lift hill available.
- Fix: [#11695] Mechanics walk to tile 0, 0 at entrance only stations when trying to fix them.
- Fix: [#11804] Some RCT1 fences are imported at the wrong height.
- Fix: [#11953] Incorrect banner text shade colour on wall text.
- Fix: [#12062] Inconsistent lift hill sprites on Flying Coaster while inverted (original bug).
- Fix: [#12068] Incorrect Entrance/Exit location on track design preview. Incorrect track design previews with track that contain diagonal track elements.

View File

@@ -2807,13 +2807,25 @@ private:
ConvertWall(&type, &colourA, &colourB);
type = _wallTypeToEntryMap[type];
auto edgeSlope = LandSlopeToWallSlope[slope][edge & 3] & ~EDGE_SLOPE_ELEVATED;
auto baseZ = originalTileElement.GetBaseZ();
auto clearanceZ = originalTileElement.GetClearanceZ();
auto edgeSlope = LandSlopeToWallSlope[slope][edge & 3];
if (edgeSlope & (EDGE_SLOPE_UPWARDS | EDGE_SLOPE_DOWNWARDS))
{
clearanceZ += LAND_HEIGHT_STEP;
}
if (edgeSlope & EDGE_SLOPE_ELEVATED)
{
edgeSlope &= ~EDGE_SLOPE_ELEVATED;
baseZ += LAND_HEIGHT_STEP;
clearanceZ += LAND_HEIGHT_STEP;
}
auto element = tile_element_insert(location, originalTileElement.GetOccupiedQuadrants());
element->SetType(TILE_ELEMENT_TYPE_WALL);
element->SetDirection(edge);
element->SetBaseZ(originalTileElement.GetBaseZ());
element->SetClearanceZ(originalTileElement.GetClearanceZ());
element->SetBaseZ(baseZ);
element->SetClearanceZ(clearanceZ);
auto wallElement = element->AsWall();
wallElement->SetEntryIndex(type);