]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_light.c
muzzleflash fades out
[xonotic/darkplaces.git] / r_light.c
index 2e99dfff99cbe396590884105b4e9f5297eca370..6860122a592f58a1ebd239f4544e43dc4969dc86 100644 (file)
--- a/r_light.c
+++ b/r_light.c
@@ -755,7 +755,7 @@ void R_CompleteLightPoint (vec3_t color, vec3_t p, int dynamic, mleaf_t *leaf)
                        if (d_lightstylevalue[sl->style] > 0)
                        {
                                VectorSubtract (p, sl->origin, dist);
-                               f = DotProduct(dist, dist) + 65536.0f;
+                               f = DotProduct(dist, dist) + sl->distbias;
                                f = (1.0f / f) - sl->subtract;
                                if (f > 0)
                                {
@@ -897,7 +897,7 @@ void R_LightModel(int numverts, float colorr, float colorg, float colorb, int wo
                                        VectorScale(sl->light, f, nl->light);
                                        nl->cullradius2 = 99999999;
                                        nl->lightsubtract = sl->subtract;
-                                       nl->offset = 65536.0f;
+                                       nl->offset = sl->distbias;
                                        nl++;
                                        nearlights++;
                                }