diff options
Diffstat (limited to 'src/ai/api/ai_marine.cpp')
-rw-r--r-- | src/ai/api/ai_marine.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ai/api/ai_marine.cpp b/src/ai/api/ai_marine.cpp index f80c510e5..fb9bba882 100644 --- a/src/ai/api/ai_marine.cpp +++ b/src/ai/api/ai_marine.cpp @@ -64,11 +64,13 @@ return gtts1 != TRACK_BIT_NONE; } -/* static */ bool AIMarine::BuildWaterDepot(TileIndex tile, bool vertical) +/* static */ bool AIMarine::BuildWaterDepot(TileIndex tile, TileIndex front) { EnforcePrecondition(false, ::IsValidTile(tile)); + EnforcePrecondition(false, ::IsValidTile(front)); + EnforcePrecondition(false, (::TileX(front) == ::TileX(tile)) != (::TileY(front) == ::TileY(tile))); - return AIObject::DoCommand(tile, vertical, 0, CMD_BUILD_SHIP_DEPOT); + return AIObject::DoCommand(tile, ::TileY(front) == ::TileY(tile), 0, CMD_BUILD_SHIP_DEPOT); } /* static */ bool AIMarine::BuildDock(TileIndex tile, StationID station_id) |