summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-06-03 22:43:59 +0000
committertron <tron@openttd.org>2005-06-03 22:43:59 +0000
commit7f0caaa89a0230fa4791bf0d4e9b45acdfb801a7 (patch)
tree921c8439879a66403a8917b702f3bc746709060f
parent6933aaa21037af769822c6b3f3589ff90e47e979 (diff)
downloadopenttd-7f0caaa89a0230fa4791bf0d4e9b45acdfb801a7.tar.xz
(svn r2404) assert that GetTileOwner() isn't called for tiles, which don't store owner information
-rw-r--r--tile.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tile.h b/tile.h
index 7704275b5..e19a24b7f 100644
--- a/tile.h
+++ b/tile.h
@@ -81,6 +81,10 @@ static inline bool IsTileType(TileIndex tile, TileType type)
static inline Owner GetTileOwner(TileIndex tile)
{
assert(tile < MapSize());
+ assert(!IsTileType(tile, MP_HOUSE));
+ assert(!IsTileType(tile, MP_VOID));
+ assert(!IsTileType(tile, MP_INDUSTRY));
+
return _map_owner[tile];
}