From 26f7aec5b77559da567346b3bd4dfeb211eeda0a Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 5 Mar 2005 15:28:20 +0000 Subject: [PATCH] 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 --- engine/common/gl_q2bsp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/common/gl_q2bsp.c b/engine/common/gl_q2bsp.c index e5e7cdf37..161d282a1 100644 --- a/engine/common/gl_q2bsp.c +++ b/engine/common/gl_q2bsp.c @@ -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; d2 = DotProduct (p2, plane->normal) - dist; - if (d1 > 0) - startout = true; - // if completely in front of face, no intersection if (d1 > 0 && d2 >= d1) return; + if (d1 > 0) + startout = true; + if (d1 <= 0 && d2 <= 0) continue; @@ -4049,7 +4049,7 @@ void CM_ClipBoxToPatch (vec3_t mins, vec3_t maxs, vec3_t p1, vec3_t p2, if (!startout) return; // original point is inside the patch - if (enterfrac < leavefrac) + if (enterfrac <= leavefrac) { if (leadside && leadside->surface && enterfrac < trace->fraction)