diff options
author | tron <tron@openttd.org> | 2005-06-04 11:56:32 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-06-04 11:56:32 +0000 |
commit | 0c4ecbe9ece42d071a4f4e4b6d506be32030cb4c (patch) | |
tree | 172ef15bca6626b797fbf586a043a978ee884141 /players.c | |
parent | 19e2b40a788cc175f35e4ca0cec0f439bd46ab76 (diff) | |
download | openttd-0c4ecbe9ece42d071a4f4e4b6d506be32030cb4c.tar.xz |
(svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix some bogus reads of _map_owner
Diffstat (limited to 'players.c')
-rw-r--r-- | players.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -281,8 +281,10 @@ bool CheckOwnership(byte owner) bool CheckTileOwnership(uint tile) { - byte owner = _map_owner[tile]; + byte owner = GetTileOwner(tile); + assert(owner <= OWNER_WATER); + if (owner == _current_player) return true; _error_message = STR_013B_OWNED_BY; |