From 294bc146522ea305745889f123ed7debf8364f5d Mon Sep 17 00:00:00 2001 From: frosch Date: Thu, 28 Jan 2010 19:41:45 +0000 Subject: [PATCH] (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. --- src/industry_cmd.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 5f8e38732f..2668ded0f4 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; }