Kruptein / PlanarAlly

A companion tool for when you travel into the planes.
https://www.planarally.io/
MIT License
395 stars 73 forks source link

bug(Aura): Fix aura changes not updating shape sectors #1238

Closed Kruptein closed 1 year ago

Kruptein commented 1 year ago

To reduce the amount of shapes that multiple render-related functions have to check, PA orders the scene in sectors and keeps track of which shapes are visible in which sectors. A shape is visible in a sector if the shape itself or any of its active auras extend into a sector.

When modifying aura properties (the range being the most important here), the shape's sectors were not being recalculated.

This caused lights that became public to players or increased in range to not be visible in the new sectors it's supposed to be visible. They would be shown to their full extent if any of the original shape sectors were in view, but not if (only) any of the new sectors were.

In the other direction a shape that disappeared or shrank in size would still be checked in sectors it should no longer be, but this was never causing visual problems.