From 969efaea336f33793b6c35cea05f595f4d9e0f03 Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 20 Feb 2010 13:31:40 +0000 Subject: [PATCH] slight improvement to BIH recursion speeds by checking for box overlap on every node (in addition to the side check) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9990 d7cf8633-e32d-0410-b094-e92efae38249 --- model_brush.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/model_brush.c b/model_brush.c index 2f7caae2..ca0f454b 100644 --- a/model_brush.c +++ b/model_brush.c @@ -5760,7 +5760,7 @@ static void Mod_CollisionBIH_TraceLine_RecursiveBIHNode(trace_t *trace, dp_model while (nodenum >= 0) { node = model->collision_bih.nodes + nodenum; -#if 0 +#if 1 if (!BoxesOverlap(segmentmins, segmentmaxs, node->mins, node->maxs)) return; #endif @@ -6009,11 +6009,11 @@ static void Mod_CollisionBIH_TraceBrush_RecursiveBIHNode(trace_t *trace, dp_mode { node = model->collision_bih.nodes + nodenum; axis = node->type - BIH_SPLITX; -#if 0 -#if 0 +#if 1 if (!BoxesOverlap(segmentmins, segmentmaxs, node->mins, node->maxs)) return; #endif +#if 0 Mod_CollisionBIH_TraceBrush_RecursiveBIHNode(trace, model, node->front, thisbrush_start, thisbrush_end, segmentmins, segmentmaxs); nodenum = node->back; continue; -- 2.39.2