winding_t *frontWinding, *backWinding;
int i;
int splitPlaneNum, compileFlags;
+#if 0
+ qboolean isstruct = qfalse;
+#endif
/* count faces left */
childLists[0] = NULL;
childLists[1] = NULL;
- qboolean isstruct = 0;
for( split = list; split; split = next )
{
/* set next */
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 );
/* 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;
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