diff options
Diffstat (limited to 'src/tunnel_map.cpp')
-rw-r--r-- | src/tunnel_map.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tunnel_map.cpp b/src/tunnel_map.cpp index 593d3fe6b..ac7255155 100644 --- a/src/tunnel_map.cpp +++ b/src/tunnel_map.cpp @@ -6,6 +6,8 @@ #include "openttd.h" #include "tile.h" #include "tunnel_map.h" +#include "tunnelbridge_map.h" + /** * Gets the other end of the tunnel. Where a vehicle would reappear when it @@ -15,7 +17,7 @@ */ TileIndex GetOtherTunnelEnd(TileIndex tile) { - DiagDirection dir = GetTunnelDirection(tile); + DiagDirection dir = GetTunnelBridgeDirection(tile); TileIndexDiff delta = TileOffsByDiagDir(dir); uint z = GetTileZ(tile); @@ -24,7 +26,7 @@ TileIndex GetOtherTunnelEnd(TileIndex tile) tile += delta; } while ( !IsTunnelTile(tile) || - GetTunnelDirection(tile) != dir || + GetTunnelBridgeDirection(tile) != dir || GetTileZ(tile) != z ); @@ -52,7 +54,7 @@ bool IsTunnelInWayDir(TileIndex tile, uint z, DiagDirection dir) return z == height && IsTunnelTile(tile) && - GetTunnelDirection(tile) == dir; + GetTunnelBridgeDirection(tile) == dir; } /** |