From: havoc Date: Wed, 14 Feb 2007 06:54:24 +0000 (+0000) Subject: added bounding of info->particleaccumulator so that bogus values won't cause a very... X-Git-Tag: xonotic-v0.1.0preview~3577 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ef3f9a010bde51c9a03fc0de263927ad8eb320fa;p=xonotic%2Fdarkplaces.git added bounding of info->particleaccumulator so that bogus values won't cause a very long loop git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6838 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_particles.c b/cl_particles.c index c0238225..8b80cadd 100644 --- a/cl_particles.c +++ b/cl_particles.c @@ -1119,6 +1119,7 @@ void CL_ParticleTrail(int effectnameindex, float pcount, const vec3_t originmins info->particleaccumulator += info->countabsolute + pcount * info->countmultiplier * cl_particles_quality.value; trailstep = 0; } + info->particleaccumulator = bound(0, info->particleaccumulator, 16384); for (;info->particleaccumulator >= 1;info->particleaccumulator--) { if (info->tex[1] > info->tex[0])