diff options
author | frosch <frosch@openttd.org> | 2015-03-28 14:04:06 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2015-03-28 14:04:06 +0000 |
commit | beb213f9eec6696133d662ed7542f4b2272b52a2 (patch) | |
tree | 29d3e48db8887e55b79c85cfc3a6bf030b80cee2 /src/tunnelbridge_cmd.cpp | |
parent | 8f03a02efc6fee08dac0d4481197da5a2c194b3b (diff) | |
download | openttd-beb213f9eec6696133d662ed7542f4b2272b52a2.tar.xz |
(svn r27209) -Add: Draw path reservation on the whole bridge, not only on the bridge heads.
Diffstat (limited to 'src/tunnelbridge_cmd.cpp')
-rw-r--r-- | src/tunnelbridge_cmd.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index f77ef1333..574f07ae4 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -1481,6 +1481,16 @@ void DrawBridgeMiddle(const TileInfo *ti) AddSortableSpriteToDraw(surface + axis, PAL_NONE, x, y, 16, 16, 0, bridge_z, IsTransparencySet(TO_BRIDGES)); } } + + if (_game_mode != GM_MENU && _settings_client.gui.show_track_reservation && !IsInvisibilitySet(TO_BRIDGES) && HasTunnelBridgeReservation(rampnorth)) { + if (rti->UsesOverlay()) { + SpriteID overlay = GetCustomRailSprite(rti, ti->tile, RTSG_OVERLAY); + AddSortableSpriteToDraw(overlay + RTO_X + axis, PALETTE_CRASH, ti->x, ti->y, 16, 16, 0, bridge_z, IsTransparencySet(TO_BRIDGES)); + } else { + AddSortableSpriteToDraw(axis == AXIS_X ? rti->base_sprites.single_x : rti->base_sprites.single_y, PALETTE_CRASH, ti->x, ti->y, 16, 16, 0, bridge_z, IsTransparencySet(TO_BRIDGES)); + } + } + EndSpriteCombine(); if (HasCatenaryDrawn(GetRailType(rampsouth))) { |