FXGL
FXGL copied to clipboard
fix: recycle particle instead of emitter position back to pool in ParticleSystem
Fixes #1417
In ParticleSystem.onUpdate, when a particle expires it should be returned to the object pool via Pools.free(particle). Instead, Pools.free(p) was being called, which freed the emitter's Point2D position — a completely different object.
Changed Pools.free(p) → Pools.free(particle) on the removal path.