From e91d7250f5ea81db64dc40f554c711b4ee5f89a8 Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 1 Mar 2011 03:42:36 +0000 Subject: [PATCH] bouncegrid particles now scale by 0.5 if texture is not reported git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10874 d7cf8633-e32d-0410-b094-e92efae38249 --- r_shadow.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/r_shadow.c b/r_shadow.c index daa0114f..33818cb1 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -2514,10 +2514,12 @@ static void R_Shadow_UpdateBounceGridTexture(void) } if (bouncecount >= maxbounce) break; - // scale down shot color by bounce intensity and texture color + // scale down shot color by bounce intensity and texture color (or 50% if no texture reported) VectorScale(shotcolor, r_shadow_bouncegrid_particlebounceintensity.value, shotcolor); if (cliptrace.hittexture && cliptrace.hittexture->currentskinframe) VectorMultiply(shotcolor, rsurface.texture->currentskinframe->avgcolor, shotcolor); + else + VectorScale(shotcolor, 0.5f->avgcolor, shotcolor); if (VectorLength2(shotcolor) < 3.0f) break; r_refdef.stats.bouncegrid_bounces++; -- 2.39.2