Changeset - r23573:9e11ee1779ef
[Not reviewed]
master
0 1 0
peter1138 - 5 years ago 2019-02-25 13:07:22
peter1138@openttd.org
Fix #7062, Revert 7af53d7588: Don't test ship max order distance when pathfinding.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/ship_cmd.cpp
Show inline comments
 
@@ -466,8 +466,8 @@ static Track ChooseShipTrack(Ship *v, Ti
 
	bool path_found = true;
 
	Track track;
 

	
 
	if (v->dest_tile == 0 || DistanceManhattan(tile, v->dest_tile) > SHIP_MAX_ORDER_DISTANCE + 5) {
 
		/* No destination or destination too far, don't invoke pathfinder. */
 
	if (v->dest_tile == 0) {
 
		/* No destination, don't invoke pathfinder. */
 
		track = TrackBitsToTrack(v->state);
 
		if (!IsDiagonalTrack(track)) track = TrackToOppositeTrack(track);
 
		if (!HasBit(tracks, track)) track = FindFirstTrack(tracks);
0 comments (0 inline, 0 general)