]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/facebsp.c
fix an obvious q3map2 bug that causes BSP leafs to be too big sometimes. Maybe improv...
[xonotic/netradiant.git] / tools / quake3 / q3map2 / facebsp.c
index 9291f5649fc8dc63decd9e77f6e7293b2d60f815..16997842811a0ca0d591f85ac728174bfe598b44 100644 (file)
@@ -244,7 +244,9 @@ void BuildFaceTree_r( node_t *node, face_t *list )
        winding_t       *frontWinding, *backWinding;
        int                     i;
        int                     splitPlaneNum, compileFlags;
+#if 0
        qboolean isstruct = qfalse;
+#endif
        
        
        /* count faces left */
@@ -282,8 +284,10 @@ void BuildFaceTree_r( node_t *node, face_t *list )
                        continue;
                }
 
+#if 0
                if(!(split->compileFlags & C_DETAIL))
                        isstruct = 1;
+#endif
                
                /* determine which side the face falls on */
                side = WindingOnPlaneSide( split->w, plane->normal, plane->dist );
@@ -336,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