mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-12 09:09:09 +00:00
(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:
@@ -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) ||
|
||||
|
Reference in New Issue
Block a user