Changeset - r14371:808cba4beccf
[Not reviewed]
master
0 1 0
frosch - 15 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
 
@@ -1279,18 +1279,15 @@ static bool CheckIfIndustryTilesAreFree(
 
	_error_message = STR_ERROR_SITE_UNSUITABLE;
 
	bool refused_slope = false;
 
	bool custom_shape = false;
 

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

	
 
		if (gfx == GFX_WATERTILE_SPECIALCHECK) {
 
			if (!IsTileType(cur_tile, MP_WATER) ||
 
					GetTileSlope(cur_tile, NULL) != SLOPE_FLAT) {
0 comments (0 inline, 0 general)