1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-31 02:19:09 +00:00

Fix #7244, 6ca637b8c1: OPF doesn't take 90 deg turns into account.

This commit is contained in:
J0an Josep
2019-02-19 00:11:25 +01:00
committed by Michael Lutz
parent 45ce517105
commit c4fe46a475

View File

@@ -521,7 +521,8 @@ static inline TrackBits GetAvailShipTracks(TileIndex tile, DiagDirection dir, Tr
{
TrackBits tracks = GetTileShipTrackStatus(tile) & DiagdirReachesTracks(dir);
if (_settings_game.pf.forbid_90_deg) tracks &= ~TrackCrossesTracks(TrackdirToTrack(trackdir));
/* Do not remove 90 degree turns for OPF, as it isn't able to find paths taking it into account. */
if (_settings_game.pf.forbid_90_deg && _settings_game.pf.pathfinder_for_ships != VPF_OPF) tracks &= ~TrackCrossesTracks(TrackdirToTrack(trackdir));
return tracks;
}