From: havoc Date: Wed, 9 Mar 2011 09:13:52 +0000 (+0000) Subject: fixed a flaw in the culling in X-Git-Tag: xonotic-v0.5.0~423 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=975f5905dc9b81ebed1e6be80872725a06cf5b4b;p=xonotic%2Fdarkplaces.git fixed a flaw in the culling in Mod_Q1BSP_TraceLineAgainstSurfacesFindTextureOnNode which was preventing culling from working in most cases, minor speed gain git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10905 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=22edf8b4f473cdc6ebe761549c04974ddea46574 --- diff --git a/model_brush.c b/model_brush.c index 7786be2d..e7a92268 100644 --- a/model_brush.c +++ b/model_brush.c @@ -1298,7 +1298,6 @@ static const texture_t *Mod_Q1BSP_TraceLineAgainstSurfacesFindTextureOnNode(Recu int i; int j; int k; - int axis = node->plane->type; const msurface_t *surface; float normal[3]; float v0[3]; @@ -1315,16 +1314,8 @@ static const texture_t *Mod_Q1BSP_TraceLineAgainstSurfacesFindTextureOnNode(Recu for (i = 0;i < node->numsurfaces;i++, surface++) { // skip surfaces whose bounding box does not include the point - if (axis < 3) - { - if (mid[axis] < surface->mins[axis] || mid[axis] > surface->maxs[axis]) - continue; - } - else - { - if (!BoxesOverlap(mid, mid, surface->mins, surface->maxs)) - continue; - } + if (!BoxesOverlap(mid, mid, surface->mins, surface->maxs)) + continue; // skip faces with contents we don't care about if (!(t->trace->hitsupercontentsmask & surface->texture->supercontents)) continue;