(svn r24103) -Codechange: Handle clear tiles separately from house tiles.

This commit is contained in:
alberth 2012-04-08 17:27:47 +00:00
parent 2fdd9b918b
commit 035fb43e7a

View File

@ -2730,13 +2730,14 @@ static bool SearchTileForStatue(TileIndex tile, void *user_data)
/* Don't build statues under bridges. */
if (MayHaveBridgeAbove(tile) && IsBridgeAbove(tile)) return false;
if (!IsTileType(tile, MP_HOUSE) &&
!IsTileType(tile, MP_CLEAR) &&
!IsTileType(tile, MP_TREES)) {
return false;
/* A clear-able open space is always preferred. */
if ((IsTileType(tile, MP_CLEAR) || IsTileType(tile, MP_TREES)) && TryClearTile(tile)) {
return true;
}
return TryClearTile(tile);
bool house = IsTileType(tile, MP_HOUSE);
return house && TryClearTile(tile);
}
/**