From cb5b4648d45b3f078a6ae3da45707764ca46e241 Mon Sep 17 00:00:00 2001 From: "Tony J. White" Date: Wed, 21 Mar 2007 22:55:16 +0000 Subject: * clearer fix for particle system crash --- src/cgame/cg_particles.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/cgame/cg_particles.c b/src/cgame/cg_particles.c index eacb84c5..f9da4db3 100644 --- a/src/cgame/cg_particles.c +++ b/src/cgame/cg_particles.c @@ -138,7 +138,7 @@ static particle_t *CG_SpawnNewParticle( baseParticle_t *bp, particleEjector_t *p vec3_t attachmentPoint, attachmentVelocity; vec3_t transform[ 3 ]; - for( i = 0; i < MAX_PARTICLES - 1 ; i++ ) + for( i = 0; i < MAX_PARTICLES; i++ ) { p = &particles[ i ]; @@ -2225,7 +2225,7 @@ static void CG_CompactAndSortParticles( void ) if( sortedParticles[ i ]->valid ) { //find the first hole - while( sortedParticles[ j ]->valid ) + while( j < MAX_PARTICLES && sortedParticles[ j ]->valid ) j++; //no more holes -- cgit