Change: Don't apply forbid 90 deg turn settings to ships.

This commit is contained in:
Peter Nelson
2018-05-18 22:16:15 +01:00
committed by Patric Stout
parent a67ee02529
commit 3f327116db
6 changed files with 15 additions and 30 deletions

View File

@@ -474,14 +474,7 @@ static Track ChooseShipTrack(Ship *v, TileIndex tile, DiagDirection enterdir, Tr
/* No destination or destination too far, don't invoke pathfinder. */
track = TrackBitsToTrack(v->state);
if (!IsDiagonalTrack(track)) track = TrackToOppositeTrack(track);
if (!HasBit(tracks, track)) {
/* Can't continue in same direction so pick first available track. */
if (_settings_game.pf.forbid_90_deg) {
tracks &= ~TrackCrossesTracks(TrackdirToTrack(v->GetVehicleTrackdir()));
if (tracks == TRACK_BIT_NONE) return INVALID_TRACK;
}
track = FindFirstTrack(tracks);
}
if (!HasBit(tracks, track)) track = FindFirstTrack(tracks);
path_found = false;
} else {
/* Attempt to follow cached path. */