From eebcd6bcd83d46eaf2227b244863e78b2c3f7b9e Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 21 Oct 2003 11:43:58 +0000 Subject: [PATCH] moved trace endpos calculation outside of RecursiveHullCheck, to improve code layout consistency between collision box and q1bsp code (no effect on results) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3594 d7cf8633-e32d-0410-b094-e92efae38249 --- collision.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/collision.c b/collision.c index c05dcbcb..b95ab408 100644 --- a/collision.c +++ b/collision.c @@ -153,8 +153,6 @@ loc0: midf = t1 / (t1 - t2); t->trace->fraction = bound(0.0f, midf, 1.0); - VectorMA(t->start, t->trace->fraction, t->dist, t->trace->endpos); - return HULLCHECKSTATE_DONE; } @@ -259,6 +257,7 @@ void Collision_ClipTrace_Box(trace_t *trace, const vec3_t cmins, const vec3_t cm VectorCopy(end, rhc.end); VectorSubtract(rhc.end, rhc.start, rhc.dist); RecursiveHullCheck(&rhc, rhc.hull->firstclipnode, 0, 1, rhc.start, rhc.end); + VectorMA(rhc.start, rhc.trace->fraction, rhc.dist, rhc.trace->endpos); } -- 2.39.2