Mercurial > hg > openttd
changeset 9954:cec8f85994d3 draft
(svn r14109) -Fix (r14107): marking reserved tile dirty is needed for waypoints and stations even when patch option is disabled
author | smatz <smatz@openttd.org> |
---|---|
date | Wed, 20 Aug 2008 16:06:27 +0000 |
parents | 9f5e3b4f4caf |
children | c2dfac401633 |
files | src/pbs.cpp |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pbs.cpp +++ b/src/pbs.cpp @@ -83,6 +83,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ if (IsRailWaypoint(tile) || IsRailDepot(tile)) { SetDepotWaypointReservation(tile, false); MarkTileDirtyByTile(tile); + break; } if (IsPlainRailTile(tile)) UnreserveTrack(tile, t); break;