mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Use INVALID_TRACKDIR instead of 0xFF.
parent
49ab02c084
commit
16a91130a7
|
@ -1169,7 +1169,7 @@ Track NPFShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir,
|
||||||
* we did not find our target, but ftd.best_trackdir contains the direction leading
|
* we did not find our target, but ftd.best_trackdir contains the direction leading
|
||||||
* to the tile closest to our target. */
|
* to the tile closest to our target. */
|
||||||
path_found = (ftd.best_bird_dist == 0);
|
path_found = (ftd.best_bird_dist == 0);
|
||||||
if (ftd.best_trackdir == 0xff) return INVALID_TRACK;
|
if (ftd.best_trackdir == INVALID_TRACKDIR) return INVALID_TRACK;
|
||||||
return TrackdirToTrack(ftd.best_trackdir);
|
return TrackdirToTrack(ftd.best_trackdir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue