]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Place drawsurfs only based on surfaces instead of vertices.
authoruis <uis9936@gmail.com>
Sun, 10 Dec 2023 00:35:15 +0000 (03:35 +0300)
committeruis <uis9936@gmail.com>
Fri, 22 Dec 2023 15:58:12 +0000 (18:58 +0300)
Without it drawsurfs have annoying tendency to be marked as part of leaf which they only touch with verticies

tools/quake3/q3map2/surface.c

index 569fbf0811aaecbb71d5263002f49ba9a9b8e715..9b6f706b51e0c55fec49ce60c2bb84cbc4378055 100644 (file)
@@ -2315,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;
 }
 
@@ -2361,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;