mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r5966) -Fix: prevent that the industry placement's terraforming checks can leave the map on the southern side
This commit is contained in:
parent
db39da587f
commit
5890ea5a71
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue