diff --git a/src/openrct2/world/map.c b/src/openrct2/world/map.c index 917d313181..573dca3842 100644 --- a/src/openrct2/world/map.c +++ b/src/openrct2/world/map.c @@ -127,7 +127,7 @@ uint16 gLandRemainingConstructionSales; rct_xyz16 gCommandPosition; -uint8 gUnk9E2E28; +bool gMapLandRightsUpdateSuccess; static void map_update_grass_length(sint32 x, sint32 y, rct_map_element *mapElement); static void map_set_grass_length(sint32 x, sint32 y, rct_map_element *mapElement, sint32 length); @@ -1805,12 +1805,11 @@ static money32 map_set_land_ownership(uint8 flags, sint16 x1, sint16 y1, sint16 y1 = clamp(32, y1, gMapSizeUnits - 32); x2 = clamp(32, x2, gMapSizeUnits - 32); y2 = clamp(32, y2, gMapSizeUnits - 32); - gUnk9E2E28 = 0; + gMapLandRightsUpdateSuccess = false; map_buy_land_rights(x1, y1, x2, y2, 6, flags | (newOwnership << 8)); - if (!(gUnk9E2E28 & 1)) { + if (!gMapLandRightsUpdateSuccess) return 0; - } sint16 x = clamp(32, x1, gMapSizeUnits - 32); sint16 y = clamp(32, y1, gMapSizeUnits - 32); diff --git a/src/openrct2/world/map.h b/src/openrct2/world/map.h index 5d9ccbf54e..085d378401 100644 --- a/src/openrct2/world/map.h +++ b/src/openrct2/world/map.h @@ -410,7 +410,7 @@ extern uint16 gLandRemainingConstructionSales; extern rct_xyz16 gCommandPosition; -extern uint8 gUnk9E2E28; +extern bool gMapLandRightsUpdateSuccess; void map_init(sint32 size); void map_count_remaining_land_rights(); diff --git a/src/openrct2/world/park.c b/src/openrct2/world/park.c index 7efa071245..99a10451d2 100644 --- a/src/openrct2/world/park.c +++ b/src/openrct2/world/park.c @@ -977,7 +977,7 @@ static money32 map_buy_land_rights_for_tile(sint32 x, sint32 y, sint32 setting, surfaceElement->properties.surface.ownership &= 0x0F; surfaceElement->properties.surface.ownership |= newOwnership; update_park_fences_around_tile(x, y); - gUnk9E2E28 |= 1; + gMapLandRightsUpdateSuccess = true; return 0; } }