]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - misc/source/netradiant-src/tools/quake3/q3map2/facebsp.c
Update netRadiant source
[voretournament/voretournament.git] / misc / source / netradiant-src / tools / quake3 / q3map2 / facebsp.c
index f9f2f2075570b624b29ab4f7a4dbc520a2ea0490..2e4ffffea7e6b875ef8ea580cd0f70410732fdeb 100644 (file)
@@ -295,8 +295,8 @@ void BuildFaceTree_r( node_t *node, face_t *list )
                /* 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;
@@ -340,6 +340,11 @@ void BuildFaceTree_r( node_t *node, face_t *list )
                        node->children[1]->maxs[i] = plane->dist;
                        break;
                }
+               if ( plane->normal[i] == -1 ) {
+                       node->children[0]->maxs[i] = -plane->dist;
+                       node->children[1]->mins[i] = -plane->dist;
+                       break;
+               }
        }
 
 #if 0