summaryrefslogtreecommitdiff
path: root/src/pathfinder/follow_track.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pathfinder/follow_track.hpp')
-rw-r--r--src/pathfinder/follow_track.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pathfinder/follow_track.hpp b/src/pathfinder/follow_track.hpp
index 3fdc3f1f8..228817ab2 100644
--- a/src/pathfinder/follow_track.hpp
+++ b/src/pathfinder/follow_track.hpp
@@ -352,7 +352,7 @@ protected:
if (IsTunnel(m_new_tile)) {
if (!m_is_tunnel) {
DiagDirection tunnel_enterdir = GetTunnelBridgeDirection(m_new_tile);
- if (tunnel_enterdir != m_exitdir) {
+ if (tunnel_enterdir != m_exitdir || IsTunnelBridgeExit(m_new_tile)) {
m_err = EC_NO_WAY;
return false;
}
@@ -360,7 +360,7 @@ protected:
} else { // IsBridge(m_new_tile)
if (!m_is_bridge) {
DiagDirection ramp_enderdir = GetTunnelBridgeDirection(m_new_tile);
- if (ramp_enderdir != m_exitdir) {
+ if (ramp_enderdir != m_exitdir || IsTunnelBridgeExit(m_new_tile)) {
m_err = EC_NO_WAY;
return false;
}