From: havoc Date: Sat, 20 Feb 2010 13:31:40 +0000 (+0000) Subject: slight improvement to BIH recursion speeds by checking for box overlap X-Git-Tag: xonotic-v0.1.0preview~230^2~479 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=969efaea336f33793b6c35cea05f595f4d9e0f03;p=xonotic%2Fdarkplaces.git 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 --- 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;