diff options
author | smatz <smatz@openttd.org> | 2008-08-20 16:06:27 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-08-20 16:06:27 +0000 |
commit | c45a143e276d2e732d736d7353b96eb8cf537243 (patch) | |
tree | 372febd922ab7411f90184cb8ba2ab4a72274086 /src | |
parent | 2ac0767af5bafee75898c7b6b6716298518ab8ff (diff) | |
download | openttd-c45a143e276d2e732d736d7353b96eb8cf537243.tar.xz |
(svn r14109) -Fix (r14107): marking reserved tile dirty is needed for waypoints and stations even when patch option is disabled
Diffstat (limited to 'src')
-rw-r--r-- | src/pbs.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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; |