From afaf10a2c8d19f3a4a27770678d5e02494d215de Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 3 Apr 2001 05:08:23 +0000 Subject: [PATCH] fix the lost particles problem --- qw/source/r_part.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/qw/source/r_part.c b/qw/source/r_part.c index 8c359a37f..9c9671cf3 100644 --- a/qw/source/r_part.c +++ b/qw/source/r_part.c @@ -58,8 +58,6 @@ cvar_t *r_particles; void R_MaxParticlesCheck (cvar_t *var) { - // Clear out all the particles. Note this has MASSIVE problems here, it's a lot different than GL that's for sure! - R_ClearParticles (); // Do not use 0 in this! sw doesn't grok 0 and it's going to segfault if we do! r_numparticles = max(var->int_val, 1); @@ -72,9 +70,7 @@ R_MaxParticlesCheck (cvar_t *var) particles = (particle_t *) calloc (r_numparticles, sizeof (particle_t)); - // My not so successful attempts to get the sw renderer to work on the fly. ATM this causes segfaults anyway. Be wary! - particles[0].next = NULL; - free_particles = &particles[0]; + R_ClearParticles (); } /* @@ -101,8 +97,6 @@ R_ClearParticles (void) { int i; - if (!particles) - return; free_particles = &particles[0]; active_particles = NULL;