summaryrefslogtreecommitdiff
path: root/industry_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-31 07:23:15 +0000
committertron <tron@openttd.org>2005-01-31 07:23:15 +0000
commit7bbcf5875c2fc6a8fa80e417d65e1094947d78b8 (patch)
treec97da17a330889a788b8654dddbc7507d01b3b38 /industry_cmd.c
parente1c19367f0cebbe90596319e9f82d959fa54621c (diff)
downloadopenttd-7bbcf5875c2fc6a8fa80e417d65e1094947d78b8.tar.xz
(svn r1749) Move the functions which calculate distances to map.[ch] and give the more meaningful names
Diffstat (limited to 'industry_cmd.c')
-rw-r--r--industry_cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/industry_cmd.c b/industry_cmd.c
index 149d7fc68..126b596c7 100644
--- a/industry_cmd.c
+++ b/industry_cmd.c
@@ -1346,7 +1346,7 @@ static bool CheckIfIndustryTilesAreFree(uint tile, const IndustryTileTable *it,
return false;
}
} else if (type == IT_TOY_SHOP) {
- if (GetTileDist1D(t->xy, cur_tile) > 9)
+ if (DistanceMax(t->xy, cur_tile) > 9)
return false;
if (ti.type != MP_HOUSE) goto do_clear;
} else if (type == IT_WATER_TOWER) {
@@ -1379,7 +1379,7 @@ static bool CheckIfTooCloseToIndustry(uint tile, int type)
FOR_ALL_INDUSTRIES(i) {
// check if an industry that accepts the same goods is nearby
if (i->xy != 0 &&
- (GetTileDist1D(tile, i->xy) <= 14) &&
+ (DistanceMax(tile, i->xy) <= 14) &&
spec->accepts_cargo[0] != 0xFF &&
spec->accepts_cargo[0] == i->accepts_cargo[0] &&
!(_game_mode == GM_EDITOR &&
@@ -1392,7 +1392,7 @@ static bool CheckIfTooCloseToIndustry(uint tile, int type)
// check "not close to" field.
if (i->xy != 0 &&
(i->type == spec->a || i->type == spec->b || i->type == spec->c) &&
- GetTileDist1D(tile, i->xy) <= 14) {
+ DistanceMax(tile, i->xy) <= 14) {
_error_message = STR_INDUSTRY_TOO_CLOSE;
return false;
}