Prevent station ends, flat rides and shops invalidating unnecessarily

This commit is contained in:
mix authored and GitHub committed 2025-04-07 22:18:54 +02:00
1 parent 9bc65f473b
commit 70dc237014
1 file changed
+6 -4
+6 -4
View File
@@ -332,10 +332,12 @@ static void RideInvalidateStationStart(Ride& ride, StationIndex stationIndex, bo
if (tileElement == nullptr)
return;
tileElement->AsTrack()->SetHasGreenLight(greenLight);
// Invalidate map tile
MapInvalidateTileZoom1({ startPos, tileElement->GetBaseZ(), tileElement->GetClearanceZ() });
TrackElement* const trackElement = tileElement->AsTrack();
if (trackElement->HasGreenLight() != greenLight)
{
trackElement->SetHasGreenLight(greenLight);
MapInvalidateTileZoom1({ startPos, tileElement->GetBaseZ(), tileElement->GetClearanceZ() });
}
}
TileElement* RideGetStationStartTrackElement(const Ride& ride, StationIndex stationIndex)