Fix for glowing objects sometimes appearing black.
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 31 Aug 2000 15:32:50 +0000 (15:32 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 31 Aug 2000 15:32:50 +0000 (15:32 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@19 d7cf8633-e32d-0410-b094-e92efae38249

r_light.c

index 141d90508129514420b9e363a59e532ccb1dd670..ab541e66fe199607dcc5cfc0f49d8b796e91fcd5 100644 (file)
--- a/r_light.c
+++ b/r_light.c
@@ -419,7 +419,7 @@ void R_LightModel(int numverts, vec3_t center)
                        if (cl_dlights[i].die < cl.time || !cl_dlights[i].radius)
                                continue;
                        VectorSubtract (center, cl_dlights[i].origin, dist);
-                       if ((t2 = DotProduct(dist,dist)) + 64.0f < (t1 = cl_dlights[i].radius*cl_dlights[i].radius))
+                       if ((t2 = DotProduct(dist,dist) + 16.0f) + 64.0f < (t1 = cl_dlights[i].radius*cl_dlights[i].radius))
                        {
                                VectorCopy(cl_dlights[i].origin, nearlight[nearlights].origin);
                                nearlight[nearlights].color[0] = cl_dlights[i].color[0] * cl_dlights[i].radius * cl_dlights[i].radius * 0.5f;