mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
Change: Obey forbid_90_deg_turns when choosing available track with no destination.
This commit is contained in:
parent
7284b593c7
commit
6b0a467a50
@ -465,6 +465,10 @@ static Track ChooseShipTrack(Ship *v, TileIndex tile, DiagDirection enterdir, Tr
|
||||
if (track != TRACK_X && track != TRACK_Y) 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);
|
||||
}
|
||||
path_found = false;
|
||||
|
Loading…
Reference in New Issue
Block a user