mirror of https://github.com/OpenRCT2/OpenRCT2.git
fix part of #2747: mistake in map coordinate clamping for set ownership
This commit is contained in:
parent
7c8245a63f
commit
0584de1501
|
@ -1751,7 +1751,7 @@ money32 map_set_land_ownership(uint8 flags, sint16 x1, sint16 y1, sint16 x2, sin
|
|||
|
||||
// Clamp to maximum addressable element to prevent long loop spamming the log
|
||||
x1 = clamp(0, x1, RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, sint16));
|
||||
y1 = clamp(0, x1, RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, sint16));
|
||||
y1 = clamp(0, y1, RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, sint16));
|
||||
x2 = min(x2, RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, sint16));
|
||||
y2 = min(y2, RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, sint16));
|
||||
for (sint16 y = y1; y <= y2; y += 32) {
|
||||
|
|
Loading…
Reference in New Issue