X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=tools%2Fquake3%2Fq3map2%2Ffacebsp.c;h=aabc2bcc5b5f0b4b651ec5fab76c510ee7671f50;hb=131c36f6be58bba507a42f767533b061b721dfec;hp=e35f289206b658ba708fa309d244a84edd1dd4fd;hpb=7833fbdebf8b07f921c1bbcc657c9bad553c3cd6;p=xonotic%2Fnetradiant.git diff --git a/tools/quake3/q3map2/facebsp.c b/tools/quake3/q3map2/facebsp.c index e35f2892..aabc2bcc 100644 --- a/tools/quake3/q3map2/facebsp.c +++ b/tools/quake3/q3map2/facebsp.c @@ -90,8 +90,6 @@ static void SelectSplitPlaneNum( node_t *node, face_t *list, int *splitPlaneNum, int planenum; float sizeBias; - //int frontC,backC,splitsC,facingC; - /* ydnar: set some defaults */ *splitPlaneNum = -1; /* leaf */ @@ -179,10 +177,6 @@ static void SelectSplitPlaneNum( node_t *node, face_t *list, int *splitPlaneNum, if ( value > bestValue ) { bestValue = value; bestSplit = split; - //frontC=front; - //backC=back; - //splitsC=splits; - //facingC=facing; } } @@ -191,24 +185,10 @@ static void SelectSplitPlaneNum( node_t *node, face_t *list, int *splitPlaneNum, return; } - //Sys_FPrintf (SYS_VRB, "F: %d B:%d S:%d FA:%ds\n",frontC,backC,splitsC,facingC ); - /* set best split data */ *splitPlaneNum = bestSplit->planenum; *compileFlags = bestSplit->compileFlags; -#if 0 - if ( bestSplit->compileFlags & C_DETAIL ) { - for ( split = list; split; split = split->next ) - if ( !( split->compileFlags & C_DETAIL ) ) { - Sys_FPrintf( SYS_ERR, "DON'T DO SUCH SPLITS (1)\n" ); - } - } - if ( ( node->compileFlags & C_DETAIL ) && !( bestSplit->compileFlags & C_DETAIL ) ) { - Sys_FPrintf( SYS_ERR, "DON'T DO SUCH SPLITS (2)\n" ); - } -#endif - if ( *splitPlaneNum > -1 ) { mapplanes[ *splitPlaneNum ].counter++; } @@ -248,9 +228,6 @@ 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 */ @@ -286,19 +263,14 @@ 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 ); /* switch on side */ if ( side == SIDE_CROSS ) { + /* strict; if no winding is left, we have a "virtually identical" plane and don't want to split by it */ 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 */ + &frontWinding, &backWinding ); if ( frontWinding ) { newFace = AllocBspFace(); newFace->w = frontWinding; @@ -351,25 +323,10 @@ void BuildFaceTree_r( node_t *node, face_t *list ){ } } -#if 0 - if ( ( node->compileFlags & C_DETAIL ) && isstruct ) { - Sys_FPrintf( SYS_ERR, "I am detail, my child is structural, this is a wtf1\n", node->has_structural_children ); - } -#endif - for ( i = 0 ; i < 2 ; i++ ) { BuildFaceTree_r( node->children[i], childLists[i] ); node->has_structural_children |= node->children[i]->has_structural_children; } - -#if 0 - if ( ( node->compileFlags & C_DETAIL ) && !( node->children[0]->compileFlags & C_DETAIL ) && node->children[0]->planenum != PLANENUM_LEAF ) { - Sys_FPrintf( SYS_ERR, "I am detail, my child is structural\n", node->has_structural_children ); - } - if ( ( node->compileFlags & C_DETAIL ) && isstruct ) { - Sys_FPrintf( SYS_ERR, "I am detail, my child is structural, this is a wtf2\n", node->has_structural_children ); - } -#endif }