From 7f6382badd3ea4f2c21920c9951997d4b431d0a2 Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 11 Jun 2008 13:54:01 +0000 Subject: (svn r13464) -Codechange: support NewGRF Action 0x05, type 12. --- src/yapf/follow_track.hpp | 2 +- src/yapf/yapf_ship.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/yapf') 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; -- cgit v1.2.3-54-g00ecf