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

Fix #12368: Don't modify station properties when placing ghost tiles

This commit is contained in:
Manuel Vögele
2020-10-26 21:35:44 +01:00
committed by GitHub
parent b0c273f478
commit c440dac600
2 changed files with 3 additions and 2 deletions

View File

@@ -686,7 +686,7 @@ public:
}
}
if (entranceDirections & TRACK_SEQUENCE_FLAG_ORIGIN)
if (entranceDirections & TRACK_SEQUENCE_FLAG_ORIGIN && !(GetFlags() & GAME_COMMAND_FLAG_GHOST))
{
if (trackBlock->index == 0)
{

View File

@@ -428,7 +428,8 @@ public:
cost += (_support_height / 2) * RideTypeDescriptors[ride->type].BuildCosts.SupportPrice;
if (entranceDirections & TRACK_SEQUENCE_FLAG_ORIGIN && (tileElement->AsTrack()->GetSequenceIndex() == 0))
if (entranceDirections & TRACK_SEQUENCE_FLAG_ORIGIN && !(tileElement->Flags & TILE_ELEMENT_FLAG_GHOST)
&& (tileElement->AsTrack()->GetSequenceIndex() == 0))
{
if (!track_remove_station_element({ mapLoc, _origin.direction }, rideIndex, GAME_COMMAND_FLAG_APPLY))
{