summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2006-08-20 10:45:36 +0000
committerrubidium <rubidium@openttd.org>2006-08-20 10:45:36 +0000
commit5890ea5a716bf74f6925adc3485c3c0e2e27b6ab (patch)
tree79c2cc617833045a94f0b1555cda98344ad45587
parentdb39da587f4ab98734cd1503f6c6bc45a43229a5 (diff)
downloadopenttd-5890ea5a716bf74f6925adc3485c3c0e2e27b6ab.tar.xz
(svn r5966) -Fix: prevent that the industry placement's terraforming checks can leave the map on the southern side
-rw-r--r--industry_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/industry_cmd.c b/industry_cmd.c
index 485747f2d..cf6592155 100644
--- a/industry_cmd.c
+++ b/industry_cmd.c
@@ -1317,7 +1317,7 @@ static bool CheckIfCanLevelIndustryPlatform(TileIndex tile, uint32 flags, const
size_y = max_y + 4;
/* Check if we don't leave the map */
- if (TileX(cur_tile) == 0 || TileY(cur_tile) == 0 || GetTileType(cur_tile) == MP_VOID) return false;
+ if (TileX(cur_tile) == 0 || TileY(cur_tile) == 0 || TileX(cur_tile) + size_x >= MapMaxX() || TileY(cur_tile) + size_y >= MapMaxY()) return false;
BEGIN_TILE_LOOP(tile_walk, size_x, size_y, cur_tile) {
curh = TileHeight(tile_walk);