mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-19 21:13:05 +01:00
Fix #14365: Previews broken for track designs with scenery below track
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user