mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 18:31:59 -05:00
Fix #6388: Con. rights wrongly shown as available on some RCT1 parks
I am an idiot
This commit is contained in:
parent
29c604d850
commit
50f16b6600
2 changed files with 19 additions and 7 deletions
|
@ -68,6 +68,7 @@
|
||||||
- Fix: [#6331] Scenery costs nothing in track designs.
|
- Fix: [#6331] Scenery costs nothing in track designs.
|
||||||
- Fix: [#6360] Off-by-one filenames when exporting all sprites.
|
- Fix: [#6360] Off-by-one filenames when exporting all sprites.
|
||||||
- Fix: [#6358] HTTP requests can point to invalid URL string.
|
- Fix: [#6358] HTTP requests can point to invalid URL string.
|
||||||
|
- Fix: [#6388] Construction rights tool erroneously enabled in some RCT1 scenarios even when no rights available.
|
||||||
- Fix: [#6413] Maze previews only showing scenery.
|
- Fix: [#6413] Maze previews only showing scenery.
|
||||||
- Fix: [#6423] Importing parks containing names with Polish characters.
|
- Fix: [#6423] Importing parks containing names with Polish characters.
|
||||||
- Fix: [#6423] Polish characters now correctly drawn when using the sprite font.
|
- Fix: [#6423] Polish characters now correctly drawn when using the sprite font.
|
||||||
|
|
|
@ -434,20 +434,31 @@ void map_count_remaining_land_rights()
|
||||||
gLandRemainingOwnershipSales = 0;
|
gLandRemainingOwnershipSales = 0;
|
||||||
gLandRemainingConstructionSales = 0;
|
gLandRemainingConstructionSales = 0;
|
||||||
|
|
||||||
for (sint32 x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++) {
|
for (sint32 x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++)
|
||||||
for (sint32 y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++) {
|
{
|
||||||
|
for (sint32 y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++)
|
||||||
|
{
|
||||||
rct_tile_element *element = map_get_surface_element_at(x, y);
|
rct_tile_element *element = map_get_surface_element_at(x, y);
|
||||||
// Surface elements are sometimes hacked out to save some space for other map elements
|
// Surface elements are sometimes hacked out to save some space for other map elements
|
||||||
if (element == NULL) {
|
if (element == NULL)
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8 flags = element->properties.surface.ownership;
|
uint8 flags = element->properties.surface.ownership;
|
||||||
|
|
||||||
if ((flags & OWNERSHIP_AVAILABLE) && (flags & OWNERSHIP_OWNED) == 0) {
|
// Do not combine this condition with (flags & OWNERSHIP_AVAILABLE)
|
||||||
gLandRemainingOwnershipSales++;
|
// As some RCT1 parks have owned tiles with the 'construction rights available' flag also set
|
||||||
} else if ((flags & OWNERSHIP_CONSTRUCTION_RIGHTS_AVAILABLE) && (flags & OWNERSHIP_CONSTRUCTION_RIGHTS_OWNED) == 0) {
|
if (!(flags & OWNERSHIP_OWNED))
|
||||||
gLandRemainingConstructionSales++;
|
{
|
||||||
|
if (flags & OWNERSHIP_AVAILABLE)
|
||||||
|
{
|
||||||
|
gLandRemainingOwnershipSales++;
|
||||||
|
}
|
||||||
|
else if ((flags & OWNERSHIP_CONSTRUCTION_RIGHTS_AVAILABLE) && (flags & OWNERSHIP_CONSTRUCTION_RIGHTS_OWNED) == 0)
|
||||||
|
{
|
||||||
|
gLandRemainingConstructionSales++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue