]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix a bug that made rtlighting crash (thanks to Vic for reporting this)
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 3 May 2005 18:30:12 +0000 (18:30 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 3 May 2005 18:30:12 +0000 (18:30 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5217 d7cf8633-e32d-0410-b094-e92efae38249

r_shadow.c

index 09b79b3be0e5edbaeb103a66d4cdf820f2fba5d9..8c6972d1da1038dd6fdddae05004978d08e4fe5c 100644 (file)
@@ -1499,8 +1499,6 @@ void R_Shadow_RenderLighting(int firstvertex, int numvertices, int numtriangles,
                glosstexture = r_texture_black;
                specularscale = 0;
        }
-       if ((ambientscale + diffusescale) * (VectorLength2(lightcolorbase) + VectorLength2(lightcolorpants) + VectorLength2(lightcolorshirt)) + specularscale * VectorLength2(lightcolorbase) <= 0.001)
-               return;
        if (!basetexture)
                basetexture = r_texture_white;
        if (!bumptexture)
@@ -1511,6 +1509,8 @@ void R_Shadow_RenderLighting(int firstvertex, int numvertices, int numtriangles,
                lightcolorpants = vec3_origin;
        if (!lightcolorshirt)
                lightcolorshirt = vec3_origin;
+       if ((ambientscale + diffusescale) * (VectorLength2(lightcolorbase) + VectorLength2(lightcolorpants) + VectorLength2(lightcolorshirt)) + specularscale * VectorLength2(lightcolorbase) <= 0.001)
+               return;
        if (visiblelighting)
        {
                int passes = 0;