src/ship_cmd.cpp
changeset 8888 94cc8a25185f
parent 8846 f3e877a92e2b
child 8963 4b41ed1df7e5
equal deleted inserted replaced
8887:4bc5c9811562 8888:94cc8a25185f
   477 		i = RemoveFirstTrack(&bits);
   477 		i = RemoveFirstTrack(&bits);
   478 
   478 
   479 		pfs.best_bird_dist = (uint)-1;
   479 		pfs.best_bird_dist = (uint)-1;
   480 		pfs.best_length = (uint)-1;
   480 		pfs.best_length = (uint)-1;
   481 
   481 
   482 		FollowTrack(tile, 0x3800 | TRANSPORT_WATER, 0, (DiagDirection)_ship_search_directions[i][dir], (TPFEnumProc*)ShipTrackFollower, NULL, &pfs);
   482 		FollowTrack(tile, 0x1800 | TRANSPORT_WATER, 0, (DiagDirection)_ship_search_directions[i][dir], (TPFEnumProc*)ShipTrackFollower, NULL, &pfs);
   483 
   483 
   484 		if (best_track != INVALID_TRACK) {
   484 		if (best_track != INVALID_TRACK) {
   485 			if (pfs.best_bird_dist != 0) {
   485 			if (pfs.best_bird_dist != 0) {
   486 				/* neither reached the destination, pick the one with the smallest bird dist */
   486 				/* neither reached the destination, pick the one with the smallest bird dist */
   487 				if (pfs.best_bird_dist > best_bird_dist) goto bad;
   487 				if (pfs.best_bird_dist > best_bird_dist) goto bad;