/* check for patches with adjacent edges that need to lod together */
PatchMapDrawSurfs( e );
+ if ( debugClip ) {
+ AddTriangleModels( e );
+ }
+
/* build an initial bsp tree using all of the sides of all of the structural brushes */
faces = MakeStructuralBSPFaceList( entities[ 0 ].brushes );
tree = FaceBSP( faces );
Sys_FPrintf( SYS_NOXML, "**********************\n" );
polyline = LeakFile( tree, lineFilePath );
leaknode = xmlNewNode( NULL, (xmlChar*)"message" );
- xmlNodeSetContent( leaknode, (xmlChar*)"MAP LEAKED\n" );
+ xmlNodeAddContent( leaknode, (xmlChar*)"MAP LEAKED\n" );
xmlAddChild( leaknode, polyline );
level[0] = (int) '0' + SYS_ERR;
level[1] = 0;
FloodAreas( tree );
/* create drawsurfs for triangle models */
- AddTriangleModels( e );
+ if ( !debugClip ) {
+ AddTriangleModels( e );
+ }
/* create drawsurfs for surface models */
AddEntitySurfaceModels( e );
/* restore -v setting */
verbose = oldVerbose;
+ Sys_FPrintf( SYS_VRB, "%9i bspModels in total\n", numBSPModels );
+
/* write fogs */
EmitFogs();
/* note it */
Sys_Printf( "--- BSP ---\n" );
+ doingBSP = qtrue;
SetDrawSurfacesBuffer();
mapDrawSurfs = safe_malloc( sizeof( mapDrawSurface_t ) * MAX_MAP_DRAW_SURFS );
memset( mapDrawSurfs, 0, sizeof( mapDrawSurface_t ) * MAX_MAP_DRAW_SURFS );
Sys_Printf( "Debug portal surfaces enabled\n" );
debugPortals = qtrue;
}
+ else if ( !strcmp( argv[ i ], "-debugclip" ) ) {
+ Sys_Printf( "Debug model clip enabled\n" );
+ debugClip = qtrue;
+ }
+ else if ( !strcmp( argv[ i ], "-clipdepth" ) ) {
+ clipDepthGlobal = atof( argv[ i + 1 ] );
+ i++;
+ Sys_Printf( "Model autoclip thickness set to %.3f\n", clipDepthGlobal );
+ }
else if ( !strcmp( argv[ i ], "-sRGBtex" ) ) {
texturesRGB = qtrue;
Sys_Printf( "Textures are in sRGB\n" );
else if ( !strcmp( argv[ i ], "-bsp" ) ) {
Sys_Printf( "-bsp argument unnecessary\n" );
}
- else{
- Sys_FPrintf( SYS_WRN, "WARNING: Unknown option \"%s\"\n", argv[ i ] );
+ else if ( !strcmp( argv[ i ], "-noob" ) ) {
+ Sys_Printf( "No oBs!\n" );
+ noob = qtrue;
+ }
+ else
+ {
+ Sys_Printf( "WARNING: Unknown option \"%s\"\n", argv[ i ] );
}
}