summaryrefslogtreecommitdiff
path: root/smallmap_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-06-04 11:56:32 +0000
committertron <tron@openttd.org>2005-06-04 11:56:32 +0000
commit0c4ecbe9ece42d071a4f4e4b6d506be32030cb4c (patch)
tree172ef15bca6626b797fbf586a043a978ee884141 /smallmap_gui.c
parent19e2b40a788cc175f35e4ca0cec0f439bd46ab76 (diff)
downloadopenttd-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 'smallmap_gui.c')
-rw-r--r--smallmap_gui.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/smallmap_gui.c b/smallmap_gui.c
index 46926c2ce..4a9d2be8f 100644
--- a/smallmap_gui.c
+++ b/smallmap_gui.c
@@ -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];