Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cg_particles: do not return previous particle pointer if maximum is hit
Fix random substitution of particles. I noticed there was no error message for MAX_PARTICLE_SYSTEMS being hit. I noticed there was an error message for MAX_TRAIL_SYSTEMS being hit. So I wanted to add such error message to debug the random substitution of particles So I decided to copy-paste the MAX_TRAIL_SYSTEMS hit message and implement it for MAX_PARTICLE_SYSTEMS the cargo cult way. So I discovered the particle code was not only not printing anything when MAX_PARTICLE_SYSTEMS was hit, but was also returning the particle system anyway, the previous one before hitting MAX_PARTICLE_SYSTEMS. Then I discovered a similar unexpected return of reused pointer was also done when MAX_PARTICLES and MAX_PARTICLE_EJECTORS were hit. - Do not return previous particle if MAX_PARTICLES is hit - Do not return previous particle system if MAX_PARTICLE_SYSTEMS is hit - Do not return previous particle ejector if MAX_PARTICLE_EJECTORS is hit This is a port of a patch from Unvanquished: https://unvanquished.net
- Loading branch information