diff options
Diffstat (limited to 'src/cgame/cg_particles.c')
-rw-r--r-- | src/cgame/cg_particles.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 |