1
0
Fork 0

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

pull/7227/head
J0an Josep 2019-02-19 00:11:25 +01:00 committed by Michael Lutz
parent 45ce517105
commit c4fe46a475
1 changed files with 2 additions and 1 deletions

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;
}