]> git.xonotic.org Git - xonotic/darkplaces.git/commit
particles: fix bugs in cl_particles_quake
authorbones_was_here <bones_was_here@xonotic.au>
Tue, 7 May 2024 16:30:09 +0000 (02:30 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Thu, 9 May 2024 03:07:39 +0000 (13:07 +1000)
commit4c83f8665e56de95ae05587cb03f06b7bcb6b7e2
treea187c63c26f460f3ca89d3af5e441abdc55bc2ee
parentf0bb92030a0cb715471d4db6f5541b0c24ed35fd
particles: fix bugs in cl_particles_quake

There was a segfault when CL_NewQuakeParticle->CL_NewParticle returned
NULL, and a missing break; in case pt_snow: in R_RenderParticles causing
fall-through to pt_explode.
Introduced in 58dc7879146968c2c07e1ffd2c521487a5e768d9, I missed them in
code review, oops.

Could have just added checks for NULL in CL_ParticleExplosion but these
kinds of exceptions can get messy if several accumulate so it seemed
better to merge them into the API which also made NULL checks redundant.

Changes the particle_t comments to doxygen comments.
Fixes indenting.

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
cl_particles.c
cl_particles.h