# HG changeset patch # User frosch # Date 2010-01-28 19:41:45 # Node ID 808cba4beccf4ae8faa8724fc104e5dfe5e53cdf # Parent 1a48d262054ef87ebe8711c8e332808b068bf3d3 (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. diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1282,12 +1282,9 @@ static bool CheckIfIndustryTilesAreFree( 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; }