summaryrefslogtreecommitdiff
path: root/src/pathfinder
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2015-10-30 16:18:03 +0000
committerfrosch <frosch@openttd.org>2015-10-30 16:18:03 +0000
commit22e6a2590d3955e86af609e2a1f103b663da25c8 (patch)
treede1a93bdcee39c36f5da72b9fd464170b66ea03a /src/pathfinder
parentc1c49a0e52c6108102314cee9633bc6f5f60e4dd (diff)
downloadopenttd-22e6a2590d3955e86af609e2a1f103b663da25c8.tar.xz
(svn r27418) -Fix [FS#6329] [FS#6379]: Desync due to incorrect storage of segments with different railtype in the YAPF cache. (JGR)
Diffstat (limited to 'src/pathfinder')
-rw-r--r--src/pathfinder/follow_track.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pathfinder/follow_track.hpp b/src/pathfinder/follow_track.hpp
index a16512bc0..9f19b029c 100644
--- a/src/pathfinder/follow_track.hpp
+++ b/src/pathfinder/follow_track.hpp
@@ -144,7 +144,12 @@ struct CFollowTrackT
* missing road bit, or inability to connect the
* different bits due to slopes. */
if (IsRoadTT() && !IsTram() && TryReverse()) return true;
- m_err = EC_NO_WAY;
+
+ /* CanEnterNewTile already set a reason.
+ * Do NOT overwrite it (important for example for EC_RAIL_TYPE).
+ * Only set a reason if CanEnterNewTile was not called */
+ if (m_new_td_bits == TRACKDIR_BIT_NONE) m_err = EC_NO_WAY;
+
return false;
}
if (!Allow90degTurns()) {