mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
## Security check What currently happens is that if `preventOverlap` is not true then there is no array of point emptied progressively and points are rolled in a loop of size count for each prop. The problem is that the loop can be infinite due to `i--; // Try this point again`. A reroll happens when `height < propInfo.minHeight` or `height > propInfo.maxHeight`, height being rolled between `heightMap.minHeight` and `heightMap.maxHeight` (which are not the constraints above). - This PR checks before the loop if there is less than 0.1% chance for the upcoming heightMap rolls to be considered correct, and if not it always skips this check, ignoring `propInfo.minHeight` and `.maxHeight` to prevent a very long (possibly infinite) loop.