1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-22 15:23:01 +01:00

Prevent station ends, flat rides and shops invalidating unnecessarily

This commit is contained in:
mix
2025-04-07 21:18:54 +01:00
committed by GitHub
parent 9bc65f473b
commit 70dc237014

View File

@@ -332,11 +332,13 @@ static void RideInvalidateStationStart(Ride& ride, StationIndex stationIndex, bo
if (tileElement == nullptr)
return;
tileElement->AsTrack()->SetHasGreenLight(greenLight);
// Invalidate map tile
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)
{