(svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix some bogus reads of _map_owner

This commit is contained in:
tron
2005-06-04 11:56:32 +00:00
parent 19e2b40a78
commit 0c4ecbe9ec
25 changed files with 118 additions and 122 deletions

View File

@@ -496,12 +496,12 @@ static inline uint32 GetSmallMapOwnerPixels(TileIndex tile)
{
TileType t = GetTileType(tile);
if (t == MP_HOUSE || _map_owner[tile] == OWNER_TOWN) {
t = 0x80;
} else if (t == MP_INDUSTRY) {
if (t == MP_INDUSTRY) {
t = 0xff;
} else if (t == MP_HOUSE || IsTileOwner(tile, OWNER_TOWN)) {
t = 0x80;
} else {
t = _map_owner[tile];
t = GetTileOwner(tile);
}
return _owner_colors[t];