(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.

This commit is contained in:
frosch 2010-01-28 19:41:45 +00:00
parent 6be4560528
commit 294bc14652
1 changed files with 1 additions and 4 deletions

View File

@ -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;
}