summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-01-28 19:41:45 +0000
committerfrosch <frosch@openttd.org>2010-01-28 19:41:45 +0000
commit294bc146522ea305745889f123ed7debf8364f5d (patch)
treeb4d25f66b3251eb36cb565704615b676a222b178 /src
parent6be456052859844de5efe0e3890df93422e50676 (diff)
downloadopenttd-294bc146522ea305745889f123ed7debf8364f5d.tar.xz
(svn r18938) -Fix: Industrylayout's special water tile check did not properly check for crossing north border of map. Also don't consider MP_VOID tiles as water.
Diffstat (limited to 'src')
-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;
}