diff options
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index b29f63538..793d9363f 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -42,6 +42,8 @@ #include "autoslope.h" #include "transparency.h" #include "water.h" +#include "tunnelbridge_map.h" + const byte _track_sloped_sprites[14] = { 14, 15, 22, 13, @@ -927,12 +929,12 @@ static bool CheckSignalAutoFill(TileIndex &tile, Trackdir &trackdir, int &signal TileIndex orig_tile = tile; /* Skip to end of tunnel or bridge */ if (IsBridge(tile)) { - if (GetBridgeTransportType(tile) != TRANSPORT_RAIL) return false; - if (GetBridgeRampDirection(tile) != TrackdirToExitdir(trackdir)) return false; + if (GetTunnelBridgeTransportType(tile) != TRANSPORT_RAIL) return false; + if (GetTunnelBridgeDirection(tile) != TrackdirToExitdir(trackdir)) return false; tile = GetOtherBridgeEnd(tile); } else { - if (GetTunnelTransportType(tile) != TRANSPORT_RAIL) return false; - if (GetTunnelDirection(tile) != TrackdirToExitdir(trackdir)) return false; + if (GetTunnelBridgeTransportType(tile) != TRANSPORT_RAIL) return false; + if (GetTunnelBridgeDirection(tile) != TrackdirToExitdir(trackdir)) return false; tile = GetOtherTunnelEnd(tile); } signal_ctr += 2 + DistanceMax(orig_tile, tile) * 2; |