From e395a755abc37f44fa8d43e27284ac9cb5c1eee8 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sun, 10 Apr 2016 19:42:24 -0600 Subject: [PATCH] light: CalcPoint: correct point before interpolating normal --- light/ltface.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/light/ltface.c b/light/ltface.c index b0213c4b..199e86c6 100644 --- a/light/ltface.c +++ b/light/ltface.c @@ -651,6 +651,9 @@ CalcPoints(const modelinfo_t *modelinfo, const vec3_t offset, lightsurf_t *surf, TexCoordToWorld(us, ut, &surf->texorg, point); VectorAdd(point, offset, point); + + // corrects point + CheckObstructed(surf, offset, us, ut, point); if (surf->curved) { @@ -660,8 +663,6 @@ CalcPoints(const modelinfo_t *modelinfo, const vec3_t offset, lightsurf_t *surf, { VectorCopy(surf->plane.normal, norm); } - - CheckObstructed(surf, offset, us, ut, point); } } }