From 80834d2ecfc94f066cc1aa18ced747b9dff1af0d Mon Sep 17 00:00:00 2001 From: havoc Date: Mon, 30 Aug 2004 09:09:57 +0000 Subject: [PATCH] make sure particles are reset on level change by clearing the array git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4400 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_particles.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cl_particles.c b/cl_particles.c index 2e0d9684..477ba5f5 100644 --- a/cl_particles.c +++ b/cl_particles.c @@ -311,6 +311,7 @@ void CL_Particles_Clear(void) { cl_numparticles = 0; cl_freeparticle = 0; + memset(particles, 0, sizeof(particle_t) * cl_maxparticles); } /* @@ -359,8 +360,7 @@ void CL_Particles_Init (void) cl_part_mempool = Mem_AllocPool("CL_Part", 0, NULL); particles = (particle_t *) Mem_Alloc(cl_part_mempool, cl_maxparticles * sizeof(particle_t)); #endif - cl_numparticles = 0; - cl_freeparticle = 0; + CL_Particles_Clear(); } // list of all 26 parameters: -- 2.39.2