(svn r14284) -Fix (r13958): Trains would not look ahead and extend their reservation on a waypoint tile in all cases.
authormichi_cc
Tue, 09 Sep 2008 18:47:53 +0000
changeset 10102 dcd66d9d53af
parent 10101 3e0270e9ab9c
child 10103 ad05ade1f2c4
(svn r14284) -Fix (r13958): Trains would not look ahead and extend their reservation on a waypoint tile in all cases.
src/train_cmd.cpp
--- a/src/train_cmd.cpp	Tue Sep 09 17:42:31 2008 +0000
+++ b/src/train_cmd.cpp	Tue Sep 09 18:47:53 2008 +0000
@@ -2325,8 +2325,8 @@
 	/* Don't do any look-ahead if path_backoff_interval is 255. */
 	if (_settings_game.pf.path_backoff_interval == 255) return;
 
-	/* Exit if we reached our destination or are inside a depot. */
-	if ((v->tile == v->dest_tile && !v->current_order.IsType(OT_GOTO_STATION)) || v->u.rail.track & TRACK_BIT_DEPOT) return;
+	/* Exit if we reached our destination depot or are inside a depot. */
+	if ((v->tile == v->dest_tile && v->current_order.IsType(OT_GOTO_DEPOT)) || v->u.rail.track & TRACK_BIT_DEPOT) return;
 	/* Exit if we are on a station tile and are going to stop. */
 	if (IsRailwayStationTile(v->tile) && v->current_order.ShouldStopAtStation(v, GetStationIndex(v->tile))) return;
 	/* Exit if the current order doesn't have a destination, but the train has orders. */