From c45a143e276d2e732d736d7353b96eb8cf537243 Mon Sep 17 00:00:00 2001 From: smatz Date: Wed, 20 Aug 2008 16:06:27 +0000 Subject: (svn r14109) -Fix (r14107): marking reserved tile dirty is needed for waypoints and stations even when patch option is disabled --- src/pbs.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/pbs.cpp b/src/pbs.cpp index d321f30c7..ac16a7a7b 100644 --- a/src/pbs.cpp +++ b/src/pbs.cpp @@ -83,6 +83,7 @@ bool TryReserveRailTrack(TileIndex tile, Track t) assert((GetTileTrackStatus(tile, TRANSPORT_RAIL, 0) & TrackToTrackBits(t)) != 0); if (_settings_client.gui.show_track_reservation) { + /* show the reserved rail if needed */ MarkTileDirtyByTile(tile); } @@ -92,6 +93,7 @@ bool TryReserveRailTrack(TileIndex tile, Track t) if (IsRailWaypoint(tile) || IsRailDepot(tile)) { if (!GetDepotWaypointReservation(tile)) { SetDepotWaypointReservation(tile, true); + MarkTileDirtyByTile(tile); // some GRFs change their appearance when tile is reserved return true; } } @@ -101,7 +103,7 @@ bool TryReserveRailTrack(TileIndex tile, Track t) if (IsLevelCrossing(tile) && !GetCrossingReservation(tile)) { SetCrossingReservation(tile, true); BarCrossing(tile); - MarkTileDirtyByTile(tile); + MarkTileDirtyByTile(tile); // crossing barred, make tile dirty return true; } break; @@ -109,6 +111,7 @@ bool TryReserveRailTrack(TileIndex tile, Track t) case MP_STATION: if (IsRailwayStation(tile) && !GetRailwayStationReservation(tile)) { SetRailwayStationReservation(tile, true); + MarkTileDirtyByTile(tile); // some GRFs need redraw after reserving track return true; } break; @@ -144,6 +147,7 @@ bool TryReserveRailTrack(TileIndex tile, Track t) if (IsRailWaypoint(tile) || IsRailDepot(tile)) { SetDepotWaypointReservation(tile, false); MarkTileDirtyByTile(tile); + break; } if (IsPlainRailTile(tile)) UnreserveTrack(tile, t); break; -- cgit v1.2.3-70-g09d2