(svn r1876) Make placement of oil rigs and refineries map size agnostic
authortron
Mon, 14 Feb 2005 22:17:21 +0000
changeset 1372 b086d32562e6
parent 1371 fc15eaac6bb2
child 1373 4f5722822810
(svn r1876) Make placement of oil rigs and refineries map size agnostic
industry_cmd.c
--- a/industry_cmd.c	Mon Feb 14 20:34:31 2005 +0000
+++ b/industry_cmd.c	Mon Feb 14 22:17:21 2005 +0000
@@ -1192,7 +1192,7 @@
 	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;