diff options
author | yexo <yexo@openttd.org> | 2009-02-14 21:19:33 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-02-14 21:19:33 +0000 |
commit | c59caa45b70551f111628b1b8f275ed0b194eef3 (patch) | |
tree | 3c693efffe2aca5f64a4619f635a2b5e1155bddf /src/ai/api/ai_marine.cpp | |
parent | d8de2d14134bf5711d7b9a6e38b3d3129ed1f59b (diff) | |
download | openttd-c59caa45b70551f111628b1b8f275ed0b194eef3.tar.xz |
(svn r15491) -Change [API CHANGE]: AIMarine::BuildWaterDepot now accepts a front tile instead of a bool is_vertical (frosch).
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) |