diff --git a/source/gl_rsurf.c b/source/gl_rsurf.c index 0622b00..193c20e 100644 --- a/source/gl_rsurf.c +++ b/source/gl_rsurf.c @@ -125,7 +125,8 @@ R_AddDynamicLights (msurface_t *surf) if ( !(surf->dlightbits & (1<plane->normal) - surf->plane->dist; + VectorSubtract(cl_dlights[lnum].origin, currententity->origin, local); + dist = DotProduct (local, surf->plane->normal) - surf->plane->dist; for (i=0 ; i<3 ; i++) impact[i] = cl_dlights[lnum].origin[i] - surf->plane->normal[i]*dist;