summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-12-17 23:14:28 +0000
committerfrosch <frosch@openttd.org>2011-12-17 23:14:28 +0000
commit89c263c2df3f7d457716ae5cc8c5cf0e8eb7d520 (patch)
tree307ff7d0fa383e616b74725f4141e4b755358bf2 /src
parent8c6a37d4b41e5ffae265f79365f7dd88f030a902 (diff)
downloadopenttd-89c263c2df3f7d457716ae5cc8c5cf0e8eb7d520.tar.xz
(svn r23584) -Fix: Draw PBS reservations also for tunnels with railtype overlays.
Diffstat (limited to 'src')
-rw-r--r--src/tunnelbridge_cmd.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index 744223168..0a7932327 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -1100,12 +1100,6 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
image += tunnelbridge_direction * 2;
DrawGroundSprite(image, PAL_NONE);
- /* PBS debugging, draw reserved tracks darker */
- if (_game_mode != GM_MENU && _settings_client.gui.show_track_reservation && (transport_type == TRANSPORT_RAIL && HasTunnelBridgeReservation(ti->tile))) {
- const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(ti->tile));
- DrawGroundSprite(DiagDirToAxis(tunnelbridge_direction) == AXIS_X ? rti->base_sprites.single_x : rti->base_sprites.single_y, PALETTE_CRASH);
- }
-
if (transport_type == TRANSPORT_ROAD) {
RoadTypes rts = GetRoadTypes(ti->tile);
@@ -1128,6 +1122,11 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
if (surface != 0) DrawGroundSprite(surface + tunnelbridge_direction, PAL_NONE);
}
+ /* PBS debugging, draw reserved tracks darker */
+ if (_game_mode != GM_MENU && _settings_client.gui.show_track_reservation && HasTunnelBridgeReservation(ti->tile)) {
+ DrawGroundSprite(DiagDirToAxis(tunnelbridge_direction) == AXIS_X ? rti->base_sprites.single_x : rti->base_sprites.single_y, PALETTE_CRASH);
+ }
+
if (HasCatenaryDrawn(GetRailType(ti->tile))) {
/* Maybe draw pylons on the entry side */
DrawCatenary(ti);