Mercurial > hg > openttd
changeset 18736:50131accbd57 draft
(svn r23584) -Fix: Draw PBS reservations also for tunnels with railtype overlays.
author | frosch <frosch@openttd.org> |
---|---|
date | Sat, 17 Dec 2011 23:14:28 +0000 |
parents | e19009415726 |
children | ab47b6f903c5 |
files | src/tunnelbridge_cmd.cpp |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -1100,12 +1100,6 @@ 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 @@ 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);