diff options
Diffstat (limited to 'src/yapf')
-rw-r--r-- | src/yapf/follow_track.hpp | 2 | ||||
-rw-r--r-- | src/yapf/yapf_ship.cpp | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/yapf/follow_track.hpp b/src/yapf/follow_track.hpp index 362a3d355..d3c9c4515 100644 --- a/src/yapf/follow_track.hpp +++ b/src/yapf/follow_track.hpp @@ -264,7 +264,7 @@ protected: } // tunnel holes and bridge ramps can be entered only from proper direction - if (!IsWaterTT() && IsTileType(m_new_tile, MP_TUNNELBRIDGE)) { + if (IsTileType(m_new_tile, MP_TUNNELBRIDGE)) { if (IsTunnel(m_new_tile)) { if (!m_is_tunnel) { DiagDirection tunnel_enterdir = GetTunnelBridgeDirection(m_new_tile); diff --git a/src/yapf/yapf_ship.cpp b/src/yapf/yapf_ship.cpp index bf8d00e64..9c935388f 100644 --- a/src/yapf/yapf_ship.cpp +++ b/src/yapf/yapf_ship.cpp @@ -109,6 +109,9 @@ public: /* new trackdir does not match the next one when going straight */ c += 10; } + + c += YAPF_TILE_LENGTH * tf->m_tiles_skipped; + // apply it n.m_cost = n.m_parent->m_cost + c; return true; |