summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuXarick <43006711+SamuXarick@users.noreply.github.com>2020-04-16 19:32:20 +0100
committerGitHub <noreply@github.com>2020-04-16 20:32:20 +0200
commit93a7ff6709ca37f834e8b55208654b3d3b791a8e (patch)
tree835d36e1ebaea4475a2cf85c11894ecebec18939
parent0b8100b46f436fbb1c0b71ce4297c10d29f83dcf (diff)
downloadopenttd-93a7ff6709ca37f834e8b55208654b3d3b791a8e.tar.xz
Fix: [Script] ScriptMarine::AreWaterTilesConnected failed for aqueducts (#8074)
-rw-r--r--src/script/api/script_marine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/api/script_marine.cpp b/src/script/api/script_marine.cpp
index c175adf06..c63add8fa 100644
--- a/src/script/api/script_marine.cpp
+++ b/src/script/api/script_marine.cpp
@@ -62,11 +62,11 @@
DiagDirection to_other_tile = ::DiagdirBetweenTiles(t2, t1);
/* Determine the reachable tracks from the shared edge */
- TrackBits gtts1 = ::TrackStatusToTrackBits(::GetTileTrackStatus(t1, TRANSPORT_WATER, 0, to_other_tile)) & ::DiagdirReachesTracks(to_other_tile);
+ TrackBits gtts1 = ::TrackStatusToTrackBits(::GetTileTrackStatus(t1, TRANSPORT_WATER, 0, ReverseDiagDir(to_other_tile))) & ::DiagdirReachesTracks(to_other_tile);
if (gtts1 == TRACK_BIT_NONE) return false;
to_other_tile = ReverseDiagDir(to_other_tile);
- TrackBits gtts2 = ::TrackStatusToTrackBits(::GetTileTrackStatus(t2, TRANSPORT_WATER, 0, to_other_tile)) & ::DiagdirReachesTracks(to_other_tile);
+ TrackBits gtts2 = ::TrackStatusToTrackBits(::GetTileTrackStatus(t2, TRANSPORT_WATER, 0, ReverseDiagDir(to_other_tile))) & ::DiagdirReachesTracks(to_other_tile);
return gtts2 != TRACK_BIT_NONE;
}