Mercurial > hg > openttd
changeset 15682:917dbfbd692a draft
(svn r20348) -Fix [FS#4004]: [NoAI] Ship depots were constructed along the wrong axis
author | rubidium <rubidium@openttd.org> |
---|---|
date | Tue, 03 Aug 2010 16:38:15 +0000 |
parents | d05243e9eecf |
children | 2ffc5926520b |
files | src/ai/api/ai_marine.cpp src/ai/api/ai_marine.hpp |
diffstat | 2 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ai/api/ai_marine.cpp +++ b/src/ai/api/ai_marine.cpp @@ -77,7 +77,7 @@ EnforcePrecondition(false, ::IsValidTile(front)); EnforcePrecondition(false, (::TileX(front) == ::TileX(tile)) != (::TileY(front) == ::TileY(tile))); - return AIObject::DoCommand(tile, ::TileY(front) == ::TileY(tile), 0, CMD_BUILD_SHIP_DEPOT); + return AIObject::DoCommand(tile, ::TileX(front) == ::TileX(tile), 0, CMD_BUILD_SHIP_DEPOT); } /* static */ bool AIMarine::BuildDock(TileIndex tile, StationID station_id)
--- a/src/ai/api/ai_marine.hpp +++ b/src/ai/api/ai_marine.hpp @@ -107,6 +107,7 @@ * @exception AIMarine::ERR_MARINE_MUST_BE_BUILT_ON_WATER * @return Whether the water depot has been/can be build or not. * @note A WaterDepot is 1 tile in width, and 2 tiles in length. + * @note The depot will be built towards the south from 'tile', not necessarily towards 'front'. */ static bool BuildWaterDepot(TileIndex tile, TileIndex front);