summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-06-11 14:15:18 +0000
committeryexo <yexo@openttd.org>2009-06-11 14:15:18 +0000
commit176e55a8a3d33f10e43095f4529a18f32e14e797 (patch)
treefb7e28150363d2fbed3e13c8850486e017d01a0d /src/ai
parentc756fdd6da52cb35c79cb3036617caca3926e7f0 (diff)
downloadopenttd-176e55a8a3d33f10e43095f4529a18f32e14e797.tar.xz
(svn r16561) -Fix [NoAI]: AIMarine::AreWaterTilesConnected didn't return true for bridge head<>neighbouring water tile
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/api/ai_marine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/api/ai_marine.cpp b/src/ai/api/ai_marine.cpp
index fffa1e3a3..5b23e78cc 100644
--- a/src/ai/api/ai_marine.cpp
+++ b/src/ai/api/ai_marine.cpp
@@ -54,7 +54,7 @@
DiagDirection to_other_tile = ::DiagdirBetweenTiles(t1, t2);
/* Determine the reachable tracks from the shared edge */
- 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);
if (gtts2 == TRACK_BIT_NONE) return false;
to_other_tile = ReverseDiagDir(to_other_tile);