summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/industry_cmd.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 5f8e38732..2668ded0f 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1282,12 +1282,9 @@ static bool CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTileTable
do {
IndustryGfx gfx = GetTranslatedIndustryTileID(it->gfx);
- if (TileX(tile) + it->ti.x >= MapSizeX()) return false;
- if (TileY(tile) + it->ti.y >= MapSizeY()) return false;
- TileIndex cur_tile = tile + ToTileIndexDiff(it->ti);
+ TileIndex cur_tile = TileAddWrap(tile, it->ti.x, it->ti.y);
if (!IsValidTile(cur_tile)) {
- if (gfx == GFX_WATERTILE_SPECIALCHECK) continue;
return false;
}