light: calculate normals before correcting points, better results in concave areas
This commit is contained in:
parent
c58528499d
commit
a9ea9891bf
|
|
@ -629,9 +629,7 @@ CalcPoints(const modelinfo_t *modelinfo, const vec3_t offset, lightsurf_t *surf,
|
||||||
TexCoordToWorld(us, ut, &surf->texorg, point);
|
TexCoordToWorld(us, ut, &surf->texorg, point);
|
||||||
VectorAdd(point, offset, point);
|
VectorAdd(point, offset, point);
|
||||||
|
|
||||||
// corrects point
|
// do this before correcting the point, so we can wrap around the inside of pipes
|
||||||
CheckObstructed(surf, offset, us, ut, point);
|
|
||||||
|
|
||||||
if (surf->curved)
|
if (surf->curved)
|
||||||
{
|
{
|
||||||
CalcPointNormal(bsp, face, norm, point, 0);
|
CalcPointNormal(bsp, face, norm, point, 0);
|
||||||
|
|
@ -640,6 +638,9 @@ CalcPoints(const modelinfo_t *modelinfo, const vec3_t offset, lightsurf_t *surf,
|
||||||
{
|
{
|
||||||
VectorCopy(surf->plane.normal, norm);
|
VectorCopy(surf->plane.normal, norm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// corrects point
|
||||||
|
CheckObstructed(surf, offset, us, ut, point);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue