(svn r16561) -Fix [NoAI]: AIMarine::AreWaterTilesConnected didn't return true for bridge head<>neighbouring water tile

This commit is contained in:
yexo
2009-06-11 14:15:18 +00:00
parent c756fdd6da
commit 176e55a8a3
4 changed files with 34 additions and 4 deletions

View File

@@ -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);