Open NoahTheLegend opened 1 week ago
This is due to how particles are implemented, storage is reused. If it weren't, you would get hard crashes or corruption instead anyway. I'm not sure what's the best way to detect particle destruction script-side at the moment, though, needs looking into.
We cannot nullify handles from the engine side. This would require something like weak references, which should have been done from the start, and that would require touching all the API that touches CParticle@
.
Description
When storing an array of particles in an object with .set(), the dead (timed out) particles' are replaced with any other particles in the game in an unknown order
Reproduction
Steps to reproduce the behavior: The code in following video that energy sphere runs: