Changeset - r14371:808cba4beccf
[Not reviewed]
master
0 1 0
frosch - 14 years ago 2010-01-28 19:41:45
frosch@openttd.org
(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.
1 file changed with 1 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/industry_cmd.cpp
Show inline comments
 
@@ -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;
 
		}
 

	
0 comments (0 inline, 0 general)