diff options
author | rubidium <rubidium@openttd.org> | 2010-08-28 18:37:49 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-08-28 18:37:49 +0000 |
commit | 8fd9728e193b8bdfa1387429bd087feb12565e19 (patch) | |
tree | 958ec8fe10c0c7f7201f9a17cceeb3a694a3a2cf /src/industry_cmd.cpp | |
parent | e0ba6550d2885ccfade874679fa792648df416f5 (diff) | |
download | openttd-8fd9728e193b8bdfa1387429bd087feb12565e19.tar.xz |
(svn r20659) -Feature: make the (flat) area around an industry configurable (Eddi|zuHause)
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r-- | src/industry_cmd.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 013de136f..525af5322 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1452,9 +1452,10 @@ static bool CheckIfCanLevelIndustryPlatform(TileIndex tile, DoCommandFlag flags, if (TileX(tile) <= 1 || TileY(tile) <= 1) return false; /* Check that all tiles in area and surrounding are clear * this determines that there are no obstructing items */ - TileIndex cur_tile = tile + TileDiffXY(-1, -1); - uint size_x = max_x + 4; - uint size_y = max_y + 4; + + TileIndex cur_tile = tile + TileDiffXY(-_settings_game.construction.industry_platform, -_settings_game.construction.industry_platform); + uint size_x = max_x + 2 + 2 * _settings_game.construction.industry_platform; + uint size_y = max_y + 2 + 2 * _settings_game.construction.industry_platform; /* Check if we don't leave the map */ if (TileX(cur_tile) + size_x >= MapMaxX() || TileY(cur_tile) + size_y >= MapMaxY()) return false; |