(svn r25832) -Codechange: Reduce variety of object type test functions.

This commit is contained in:
frosch
2013-10-12 16:30:22 +00:00
parent be36812410
commit 478500abbc
4 changed files with 34 additions and 77 deletions

View File

@@ -2572,7 +2572,7 @@ static void TileLoop_Track(TileIndex tile)
/* Show fences if it's a house, industry, object, road, tunnelbridge or not owned by us. */
if (!IsValidTile(tile2) || IsTileType(tile2, MP_HOUSE) || IsTileType(tile2, MP_INDUSTRY) ||
IsTileType(tile2, MP_ROAD) || (IsTileType(tile2, MP_OBJECT) && !IsOwnedLand(tile2)) || IsTileType(tile2, MP_TUNNELBRIDGE) || !IsTileOwner(tile2, owner)) {
IsTileType(tile2, MP_ROAD) || (IsTileType(tile2, MP_OBJECT) && !IsObjectType(tile2, OBJECT_OWNED_LAND)) || IsTileType(tile2, MP_TUNNELBRIDGE) || !IsTileOwner(tile2, owner)) {
fences |= 1 << d;
}
}