summaryrefslogtreecommitdiff
path: root/src/yapf
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-06-11 13:54:01 +0000
committerrubidium <rubidium@openttd.org>2008-06-11 13:54:01 +0000
commitee843728bf7e40b23b194520803dcd74cac1d25a (patch)
tree93d0cf5e2656fbaec389d945c2682c766b5756c8 /src/yapf
parent2475d0010b9095de32a3104492f1139c224f1f86 (diff)
downloadopenttd-ee843728bf7e40b23b194520803dcd74cac1d25a.tar.xz
(svn r13464) -Codechange: support NewGRF Action 0x05, type 12.
Diffstat (limited to 'src/yapf')
-rw-r--r--src/yapf/follow_track.hpp2
-rw-r--r--src/yapf/yapf_ship.cpp3
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;