diff options
Diffstat (limited to 'src/pathfinder/opf')
-rw-r--r-- | src/pathfinder/opf/opf_ship.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pathfinder/opf/opf_ship.cpp b/src/pathfinder/opf/opf_ship.cpp index 9cf574484..850577de1 100644 --- a/src/pathfinder/opf/opf_ship.cpp +++ b/src/pathfinder/opf/opf_ship.cpp @@ -193,7 +193,8 @@ Track OPFShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, Track track; /* Let's find out how far it would be if we would reverse first */ - TrackBits b = TrackStatusToTrackBits(GetTileTrackStatus(tile2, TRANSPORT_WATER, 0)) & DiagdirReachesTracks(ReverseDiagDir(enterdir)) & v->state; + Trackdir trackdir = v->GetVehicleTrackdir(); + TrackBits b = TrackStatusToTrackBits(GetTileTrackStatus(tile2, TRANSPORT_WATER, 0)) & DiagdirReachesTracks(ReverseDiagDir(enterdir)) & TrackdirBitsToTrackBits(TrackdirToTrackdirBits(trackdir)); uint distr = UINT_MAX; // distance if we reversed if (b != 0) { |