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

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

No files matched your search

+1 -1
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)
{
+2 -1
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))
{