audit all uses of ClipWindingEpsilon and choose the strict variant or not, and explai...
[xonotic/netradiant.git] / tools / quake3 / q3map2 / facebsp.c
index 1699784..2e4ffff 100644 (file)
@@ -295,8 +295,8 @@ void BuildFaceTree_r( node_t *node, face_t *list )
                /* switch on side */
                if( side == SIDE_CROSS )
                {
                /* switch on side */
                if( side == SIDE_CROSS )
                {
-                       ClipWindingEpsilon( split->w, plane->normal, plane->dist, CLIP_EPSILON * 2,
-                               &frontWinding, &backWinding );
+                       ClipWindingEpsilonStrict( split->w, plane->normal, plane->dist, CLIP_EPSILON * 2,
+                               &frontWinding, &backWinding ); /* strict; if no winding is left, we have a "virtually identical" plane and don't want to split by it */
                        if( frontWinding ) {
                                newFace = AllocBspFace();
                                newFace->w = frontWinding;
                        if( frontWinding ) {
                                newFace = AllocBspFace();
                                newFace->w = frontWinding;