]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/surface.c
Merge branch 'NateEag-master-patch-12920' into 'master'
[xonotic/netradiant.git] / tools / quake3 / q3map2 / surface.c
index 77765fe4ed8a63243b9c71f3895f1544c27c8848..9b6f706b51e0c55fec49ce60c2bb84cbc4378055 100644 (file)
@@ -2114,8 +2114,8 @@ int FilterPointConvexHullIntoTree_r( vec3_t **points, int npoints, mapDrawSurfac
 
 int FilterWindingIntoTree_r( winding_t *w, mapDrawSurface_t *ds, node_t *node ){
        int i, refs = 0;
-       plane_t         *p1, *p2;
-       vec4_t plane1, plane2;
+       plane_t         *p1;
+       vec4_t plane1;
        winding_t       *fat, *front, *back;
        shaderInfo_t    *si;
 
@@ -2169,12 +2169,15 @@ int FilterWindingIntoTree_r( winding_t *w, mapDrawSurface_t *ds, node_t *node ){
 
                /* check if surface is planar */
                if ( ds->planeNum >= 0 ) {
+                       #if 0
+                       plane_t *p2;
+                       vec4_t plane2;
+
                        /* get surface plane */
                        p2 = &mapplanes[ ds->planeNum ];
                        VectorCopy( p2->normal, plane2 );
                        plane2[ 3 ] = p2->dist;
 
-                       #if 0
                        /* div0: this is the plague (inaccurate) */
                        vec4_t reverse;
 
@@ -2190,7 +2193,6 @@ int FilterWindingIntoTree_r( winding_t *w, mapDrawSurface_t *ds, node_t *node ){
                                return FilterWindingIntoTree_r( w, ds, node->children[ 1 ] );
                        }
                        #else
-                       (void) plane2;
                        /* div0: this is the cholera (doesn't hit enough) */
 
                        /* the drawsurf might have an associated plane, if so, force a filter here */
@@ -2313,10 +2315,6 @@ static int FilterTrianglesIntoTree( mapDrawSurface_t *ds, tree_t *tree ){
                refs += FilterWindingIntoTree_r( w, ds, tree->headnode );
        }
 
-       /* use point filtering as well */
-       for ( i = 0; i < ds->numVerts; i++ )
-               refs += FilterPointIntoTree_r( ds->verts[ i ].xyz, ds, tree->headnode );
-
        return refs;
 }
 
@@ -2359,13 +2357,6 @@ static int FilterFoliageIntoTree( mapDrawSurface_t *ds, tree_t *tree ){
                        VectorAdd( instance->xyz, ds->verts[ ds->indexes[ i + 2 ] ].xyz, w->p[ 2 ] );
                        refs += FilterWindingIntoTree_r( w, ds, tree->headnode );
                }
-
-               /* use point filtering as well */
-               for ( i = 0; i < ( ds->numVerts - ds->numFoliageInstances ); i++ )
-               {
-                       VectorAdd( instance->xyz, ds->verts[ i ].xyz, xyz );
-                       refs += FilterPointIntoTree_r( xyz, ds, tree->headnode );
-               }
        }
 
        return refs;