src/ship_cmd.cpp
changeset 8800 c30102fee110
parent 8793 5e35232593c3
child 8827 730524764a69
equal deleted inserted replaced
8799:6d3a845d5793 8800:c30102fee110
   472 		i = RemoveFirstTrack(&bits);
   472 		i = RemoveFirstTrack(&bits);
   473 
   473 
   474 		pfs.best_bird_dist = (uint)-1;
   474 		pfs.best_bird_dist = (uint)-1;
   475 		pfs.best_length = (uint)-1;
   475 		pfs.best_length = (uint)-1;
   476 
   476 
   477 		FollowTrack(tile, 0x1800 | TRANSPORT_WATER, 0, (DiagDirection)_ship_search_directions[i][dir], (TPFEnumProc*)ShipTrackFollower, NULL, &pfs);
   477 		FollowTrack(tile, PATHFIND_FLAGS_SHIP_MODE | PATHFIND_FLAGS_DISABLE_TILE_HASH, TRANSPORT_WATER, 0, (DiagDirection)_ship_search_directions[i][dir], (TPFEnumProc*)ShipTrackFollower, NULL, &pfs);
   478 
   478 
   479 		if (best_track != INVALID_TRACK) {
   479 		if (best_track != INVALID_TRACK) {
   480 			if (pfs.best_bird_dist != 0) {
   480 			if (pfs.best_bird_dist != 0) {
   481 				/* neither reached the destination, pick the one with the smallest bird dist */
   481 				/* neither reached the destination, pick the one with the smallest bird dist */
   482 				if (pfs.best_bird_dist > best_bird_dist) goto bad;
   482 				if (pfs.best_bird_dist > best_bird_dist) goto bad;