From 059e94e355c9172a42b70ff20b4b8a87dd4889ae Mon Sep 17 00:00:00 2001 From: smatz Date: Thu, 17 Apr 2008 18:24:45 +0000 Subject: (svn r12753) -Codechange: do not use IsDepotTypeTile() where simpler function can be used --- src/ship_cmd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ship_cmd.cpp') diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index 7f66ea806..e7a22b6e8 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -130,7 +130,7 @@ static const Depot* FindClosestShipDepot(const Vehicle* v) FOR_ALL_DEPOTS(depot) { TileIndex tile = depot->xy; - if (IsDepotTypeTile(tile, TRANSPORT_WATER) && IsTileOwner(tile, v->owner)) { + if (IsShipDepotTile(tile) && IsTileOwner(tile, v->owner)) { uint dist = DistanceManhattan(tile, v->tile); if (dist < best_dist) { best_dist = dist; @@ -762,7 +762,7 @@ CommandCost CmdBuildShip(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) /* The ai_new queries the vehicle cost before building the route, * so we must check against cheaters no sooner than now. --pasky */ - if (!IsDepotTypeTile(tile, TRANSPORT_WATER)) return CMD_ERROR; + if (!IsShipDepotTile(tile)) return CMD_ERROR; if (!IsTileOwner(tile, _current_player)) return CMD_ERROR; unit_num = HasBit(p2, 0) ? 0 : GetFreeUnitNumber(VEH_SHIP); -- cgit v1.2.3-54-g00ecf