summaryrefslogtreecommitdiff
path: root/src/pathfinder/yapf/yapf_costrail.hpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-02-15 23:55:04 +0000
committerrubidium <rubidium@openttd.org>2010-02-15 23:55:04 +0000
commit3626eb340e5996a9a9e1fa84c9b4023ecc55c952 (patch)
tree3f68cb7f3847ac2c7c4c067ffd1bc498879dc51e /src/pathfinder/yapf/yapf_costrail.hpp
parent80225cf2461731283ea78fde212515806718b61f (diff)
downloadopenttd-3626eb340e5996a9a9e1fa84c9b4023ecc55c952.tar.xz
(svn r19141) -Fix [FS#3619] (r18421): look-ahead for multitile waypoints 'made up' data that shouldn't go into the cache, causing desyncs in MP
Diffstat (limited to 'src/pathfinder/yapf/yapf_costrail.hpp')
-rw-r--r--src/pathfinder/yapf/yapf_costrail.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pathfinder/yapf/yapf_costrail.hpp b/src/pathfinder/yapf/yapf_costrail.hpp
index 57820af1e..6c4603c68 100644
--- a/src/pathfinder/yapf/yapf_costrail.hpp
+++ b/src/pathfinder/yapf/yapf_costrail.hpp
@@ -410,7 +410,9 @@ no_entry_cost: // jump here at the beginning if the node has no parent (it is th
end_segment_reason |= ESRB_DEPOT;
} else if (cur.tile_type == MP_STATION && IsRailWaypoint(cur.tile)) {
- if (v->current_order.IsType(OT_GOTO_WAYPOINT) && GetStationIndex(cur.tile) == v->current_order.GetDestination()) {
+ if (v->current_order.IsType(OT_GOTO_WAYPOINT) &&
+ GetStationIndex(cur.tile) == v->current_order.GetDestination() &&
+ !Waypoint::Get(v->current_order.GetDestination())->IsSingleTile()) {
/* This waypoint is our destination; maybe this isn't an unreserved
* one, so check that and if so see that as the last signal being
* red. This way waypoints near stations should work better. */