mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r24103) -Codechange: Handle clear tiles separately from house tiles.
This commit is contained in:
parent
2fdd9b918b
commit
035fb43e7a
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user