summaryrefslogtreecommitdiff
path: root/industry_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-02-14 22:17:21 +0000
committertron <tron@openttd.org>2005-02-14 22:17:21 +0000
commit4102982ef40081f1168e8b733e6ee6072db33d0a (patch)
treeed68bb0da2c9e3cebad8a7a852fc2bb3ceb5d0fa /industry_cmd.c
parent5ff839732ef486dae941647251d32f39f17e8c69 (diff)
downloadopenttd-4102982ef40081f1168e8b733e6ee6072db33d0a.tar.xz
(svn r1876) Make placement of oil rigs and refineries map size agnostic
Diffstat (limited to 'industry_cmd.c')
-rw-r--r--industry_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/industry_cmd.c b/industry_cmd.c
index 1a2971fb5..67c496820 100644
--- a/industry_cmd.c
+++ b/industry_cmd.c
@@ -1192,7 +1192,7 @@ static bool CheckNewIndustry_Oilwell(uint tile, int type)
x = TileX(tile);
y = TileY(tile);
- if ( x < 15 || y < 15 || x > 238 || y > 238)
+ if (DistanceFromEdge(TILE_ADDXY(tile, 1, 1)) < 16)
return true;
_error_message = STR_483B_CAN_ONLY_BE_POSITIONED;