summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2017-03-20 17:57:24 +0000
committerpeter1138 <peter1138@openttd.org>2017-03-20 17:57:24 +0000
commit6d0f8ec7b927a3b709934a7c77cbc62dc46a5784 (patch)
tree490a54d72ad2a4ef7999900ffc2793207ae08d0b /src
parent5951d2406e48449d517974e0edfd0a8cb847d144 (diff)
downloadopenttd-6d0f8ec7b927a3b709934a7c77cbc62dc46a5784.tar.xz
(svn r27812) -Fix: Road tunnel/bridge heads have no trackbits wrt catenary drawing
Road tunnels and bridges do not have any rail, so do not treat them as if they had when drawing a catenary. (cirdan)
Diffstat (limited to 'src')
-rw-r--r--src/elrail.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/elrail.cpp b/src/elrail.cpp
index ac3616161..9fdfb57a3 100644
--- a/src/elrail.cpp
+++ b/src/elrail.cpp
@@ -99,6 +99,7 @@ static TrackBits GetRailTrackBitsUniversal(TileIndex t, byte *override)
break;
case MP_TUNNELBRIDGE:
+ if (GetTunnelBridgeTransportType(t) != TRANSPORT_RAIL) return TRACK_BIT_NONE;
if (!HasRailCatenary(GetRailType(t))) return TRACK_BIT_NONE;
if (override != NULL && (IsTunnel(t) || GetTunnelBridgeLength(t, GetOtherBridgeEnd(t)) > 0)) {
*override = 1 << GetTunnelBridgeDirection(t);