diff options
-rw-r--r-- | src/cgame/cg_particles.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cgame/cg_particles.c b/src/cgame/cg_particles.c index e256f397..b435f56e 100644 --- a/src/cgame/cg_particles.c +++ b/src/cgame/cg_particles.c @@ -2221,6 +2221,9 @@ static void CG_CompactAndSortParticles( void ) for( i = 0; i < MAX_PARTICLES; i++ ) sortedParticles[ i ] = &particles[ i ]; + if( !cg_depthSortParticles.integer ) + return; + for( i = MAX_PARTICLES - 1; i >= 0; i-- ) { if( sortedParticles[ i ]->valid ) @@ -2436,8 +2439,7 @@ void CG_AddParticles( void ) CG_SpawnNewParticles( ); //sorting - if( cg_depthSortParticles.integer ) - CG_CompactAndSortParticles( ); + CG_CompactAndSortParticles( ); for( i = 0; i < MAX_PARTICLES; i++ ) { |