mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-06-21 12:39:47 +01:00
(svn r2404) assert that GetTileOwner() isn't called for tiles, which don't store owner information
This commit is contained in:
parent
6933aaa210
commit
7f0caaa89a
4
tile.h
4
tile.h
@ -81,6 +81,10 @@ static inline bool IsTileType(TileIndex tile, TileType type)
|
|||||||
static inline Owner GetTileOwner(TileIndex tile)
|
static inline Owner GetTileOwner(TileIndex tile)
|
||||||
{
|
{
|
||||||
assert(tile < MapSize());
|
assert(tile < MapSize());
|
||||||
|
assert(!IsTileType(tile, MP_HOUSE));
|
||||||
|
assert(!IsTileType(tile, MP_VOID));
|
||||||
|
assert(!IsTileType(tile, MP_INDUSTRY));
|
||||||
|
|
||||||
return _map_owner[tile];
|
return _map_owner[tile];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user