1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Fix #14365: Previews broken for track designs with scenery below track

This commit is contained in:
mix
2025-11-02 00:46:29 +00:00
committed by GitHub
parent bac6a9d460
commit e216c94256
2 changed files with 3 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
0.4.29 (in development)
------------------------------------------------------------------------
- Fix: [#14365] Track designs with scenery below the lowest track piece do not preview correctly.
- Fix: [#25451] Dropdown item tooltips stay open if the mouse is moved over an empty space.
0.4.28 (2025-11-01)

View File

@@ -1942,16 +1942,14 @@ static bool TrackDesignPlacePreview(
auto mapSize = TileCoordsXY{ gameState.mapSize.x * 16, gameState.mapSize.y * 16 };
_currentTrackPieceDirection = 0;
int32_t z = TrackDesignGetZPlacement(
tds, td, RideGetTemporaryForPreview(), { mapSize.x, mapSize.y, 16, _currentTrackPieceDirection });
const CoordsXYZD coords = { mapSize.x, mapSize.y, kMinimumLandZ, _currentTrackPieceDirection };
const int32_t z = kMinimumLandZ + TrackDesignGetZPlacement(tds, td, RideGetTemporaryForPreview(), coords);
if (tds.hasScenery)
{
gameStateData.setFlag(TrackDesignGameStateFlag::HasScenery, true);
}
z += 16 - tds.placeSceneryZ;
if (_trackDesignPlaceStateSceneryUnavailable)
{
placeScenery = false;