1
0
Fork 0
forked from fte/fteqw

Now works better with point traces and patches.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@891 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-03-05 15:28:20 +00:00
parent d648c9e733
commit 26f7aec5b7

View file

@ -4017,13 +4017,13 @@ void CM_ClipBoxToPatch (vec3_t mins, vec3_t maxs, vec3_t p1, vec3_t p2,
d1 = DotProduct (p1, plane->normal) - dist; d1 = DotProduct (p1, plane->normal) - dist;
d2 = DotProduct (p2, plane->normal) - dist; d2 = DotProduct (p2, plane->normal) - dist;
if (d1 > 0)
startout = true;
// if completely in front of face, no intersection // if completely in front of face, no intersection
if (d1 > 0 && d2 >= d1) if (d1 > 0 && d2 >= d1)
return; return;
if (d1 > 0)
startout = true;
if (d1 <= 0 && d2 <= 0) if (d1 <= 0 && d2 <= 0)
continue; continue;
@ -4049,7 +4049,7 @@ void CM_ClipBoxToPatch (vec3_t mins, vec3_t maxs, vec3_t p1, vec3_t p2,
if (!startout) if (!startout)
return; // original point is inside the patch return; // original point is inside the patch
if (enterfrac < leavefrac) if (enterfrac <= leavefrac)
{ {
if (leadside && leadside->surface if (leadside && leadside->surface
&& enterfrac < trace->fraction) && enterfrac < trace->fraction)