summaryrefslogtreecommitdiff
path: root/src/pathfinder/follow_track.hpp
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-10-30 11:13:12 +0100
committerErich Eckner <git@eckner.net>2018-10-30 15:28:03 +0100
commita34d095259409cf1454d9777deabbc00bcdb9407 (patch)
tree9e7c37ed33f5bd6b3c2f41cf248dcb656b2a4afa /src/pathfinder/follow_track.hpp
parent6647cb917963c4e0d6d633b7a92af78167050893 (diff)
downloadopenttd-underground-plus-others-original.tar.xz
underground patch appliedunderground-plus-others-original
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;
}