From 4fc625b39143e7423ddfac1be95ce7efbb89b1aa Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 6 Jul 2002 01:45:15 +0000 Subject: [PATCH] disabled RecursiveHullCheckPoint because it probably isn't much of a speed gain really, and it could break things in rare cases git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1991 d7cf8633-e32d-0410-b094-e92efae38249 --- collision.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/collision.c b/collision.c index de405720..a22c8fb9 100644 --- a/collision.c +++ b/collision.c @@ -165,6 +165,7 @@ loc0: return HULLCHECKSTATE_DONE; } +/* // used if start and end are the same static void RecursiveHullCheckPoint (RecursiveHullCheckTraceInfo_t *t, int num) { @@ -203,6 +204,7 @@ static void RecursiveHullCheckPoint (RecursiveHullCheckTraceInfo_t *t, int num) } } } +*/ void Collision_RoundUpToHullSize(const model_t *cmodel, const vec3_t inmins, const vec3_t inmaxs, vec3_t outmins, vec3_t outmaxs) { @@ -376,10 +378,10 @@ void Collision_ClipTrace (trace_t *trace, const void *cent, const model_t *cmode VectorCopy(endd, rhc.end); VectorCopy(rhc.end, rhc.trace->endpos); VectorSubtract(rhc.end, rhc.start, rhc.dist); - if (DotProduct(rhc.dist, rhc.dist) > 0.00001) + //if (DotProduct(rhc.dist, rhc.dist) > 0.00001) RecursiveHullCheck (&rhc, rhc.hull->firstclipnode, 0, 1, rhc.start, rhc.end); - else - RecursiveHullCheckPoint (&rhc, rhc.hull->firstclipnode); + //else + // RecursiveHullCheckPoint (&rhc, rhc.hull->firstclipnode); // if we hit, unrotate endpos and normal, and store the entity we hit if (rhc.trace->fraction != 1) @@ -418,10 +420,10 @@ void Collision_ClipTrace (trace_t *trace, const void *cent, const model_t *cmode VectorSubtract(end, offset, rhc.end); VectorCopy(rhc.end, rhc.trace->endpos); VectorSubtract(rhc.end, rhc.start, rhc.dist); - if (DotProduct(rhc.dist, rhc.dist) > 0.00001) + //if (DotProduct(rhc.dist, rhc.dist) > 0.00001) RecursiveHullCheck (&rhc, rhc.hull->firstclipnode, 0, 1, rhc.start, rhc.end); - else - RecursiveHullCheckPoint (&rhc, rhc.hull->firstclipnode); + //else + // RecursiveHullCheckPoint (&rhc, rhc.hull->firstclipnode); // if we hit, store the entity we hit if (rhc.trace->fraction != 1) -- 2.39.2