]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
made BIH collision culling support the mod_q3bsp_curves_collisions cvar
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 18 Feb 2010 00:23:50 +0000 (00:23 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 18 Feb 2010 00:23:50 +0000 (00:23 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9973 d7cf8633-e32d-0410-b094-e92efae38249

model_brush.c

index a7d3b84a9e08471b05ff8940452357dc7a2c4bb4..e9e807f1c03c2f29f37d4140dfd977d98d9dbe29 100644 (file)
@@ -5986,6 +5986,8 @@ static void Mod_CollisionBIH_TraceLine_RecursiveBIHNode(trace_t *trace, dp_model
                break;
        case BIH_LEAF + 1:
                // collision triangle
+               if (!mod_q3bsp_curves_collisions.integer)
+                       return;
                e = model->brush.data_collisionelement3i + 3*leaf->itemindex;
                texture = model->data_textures + leaf->textureindex;
                Collision_TraceLineTriangleFloat(trace, linestart, lineend, model->brush.data_collisionvertex3f + e[0] * 3, model->brush.data_collisionvertex3f + e[1] * 3, model->brush.data_collisionvertex3f + e[2] * 3, texture->supercontents, texture->surfaceflags, texture);
@@ -6049,6 +6051,8 @@ static void Mod_CollisionBIH_TraceBrush_RecursiveBIHNode(trace_t *trace, dp_mode
                break;
        case BIH_LEAF + 1:
                // collision triangle
+               if (!mod_q3bsp_curves_collisions.integer)
+                       return;
                e = model->brush.data_collisionelement3i + 3*leaf->itemindex;
                texture = model->data_textures + leaf->textureindex;
                Collision_TraceBrushTriangleFloat(trace, thisbrush_start, thisbrush_end, model->brush.data_collisionvertex3f + e[0] * 3, model->brush.data_collisionvertex3f + e[1] * 3, model->brush.data_collisionvertex3f + e[2] * 3, texture->supercontents, texture->surfaceflags, texture);