(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)
This commit is contained in:
peter1138 2017-03-20 17:57:24 +00:00
parent 166e504c13
commit 380e1a240f

View File

@ -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);