summaryrefslogtreecommitdiff
path: root/tree_cmd.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
commita9b95b3cbb397e5a644c8310d33d046b2737ce16 (patch)
tree172ef15bca6626b797fbf586a043a978ee884141 /tree_cmd.c
parent6b3d3a0f8a89c3d9b2afef555277b9009fdb544e (diff)
downloadopenttd-a9b95b3cbb397e5a644c8310d33d046b2737ce16.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 'tree_cmd.c')
-rw-r--r--tree_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tree_cmd.c b/tree_cmd.c
index 18b71c1d0..e4fe68ffc 100644
--- a/tree_cmd.c
+++ b/tree_cmd.c
@@ -195,7 +195,7 @@ int32 CmdPlantTree(int ex, int ey, uint32 flags, uint32 p1, uint32 p2)
break;
case MP_CLEAR:
- if (_map_owner[ti.tile] != OWNER_NONE) {
+ if (!IsTileOwner(ti.tile, OWNER_NONE)) {
_error_message = STR_2804_SITE_UNSUITABLE;
continue;
}
@@ -396,7 +396,7 @@ static void GetTileDesc_Trees(uint tile, TileDesc *td)
byte b;
StringID str;
- td->owner = _map_owner[tile];
+ td->owner = GetTileOwner(tile);
b = _map3_lo[tile];
(str=STR_2810_CACTUS_PLANTS, b==0x1B) ||