]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
forgot to compare fog mask table range, too
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 22 Dec 2007 16:55:05 +0000 (16:55 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 22 Dec 2007 16:55:05 +0000 (16:55 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7841 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 5550d7a1fb512b35642c8a38a4980698a15d2db2..ee6ceb4bad2a4b77e246659dc557600675e4433d 100644 (file)
@@ -397,6 +397,7 @@ static void R_BuildFogTexture(void)
 
        r_refdef.fogmasktable_start = r_refdef.fog_start;
        r_refdef.fogmasktable_alpha = r_refdef.fog_alpha;
+       r_refdef.fogmasktable_range = r_refdef.fogrange;
 
        s = r_refdef.fogmasktable_start / r_refdef.fogrange;
        s = bound(0, s, 0.999);
@@ -3285,7 +3286,7 @@ void R_UpdateVariables(void)
                r_refdef.fogmasktabledistmultiplier = FOGMASKTABLEWIDTH * r_refdef.fograngerecip;
                // fog color was already set
                // update the fog texture
-               if (r_refdef.fogmasktable_start != r_refdef.fog_start || r_refdef.fogmasktable_alpha != r_refdef.fog_alpha)
+               if (r_refdef.fogmasktable_start != r_refdef.fog_start || r_refdef.fogmasktable_alpha != r_refdef.fog_alpha || r_refdef.fogmasktable_range != r_refdef.fogrange)
                        R_BuildFogTexture();
        }
        else