summaryrefslogtreecommitdiff
path: root/src/ship_cmd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-04-17 18:24:45 +0000
committersmatz <smatz@openttd.org>2008-04-17 18:24:45 +0000
commit059e94e355c9172a42b70ff20b4b8a87dd4889ae (patch)
tree1d21e0ab2e3402600dc144e6cfc0d1e0b5725da1 /src/ship_cmd.cpp
parente098b50379219aeb0b8d22d652a3de514759eb3d (diff)
downloadopenttd-059e94e355c9172a42b70ff20b4b8a87dd4889ae.tar.xz
(svn r12753) -Codechange: do not use IsDepotTypeTile() where simpler function can be used
Diffstat (limited to 'src/ship_cmd.cpp')
-rw-r--r--src/ship_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
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);