]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/bsp.c
Merge commit 'bf803dd851539f0d5f806f12a1e2ab93fdddae08' into garux-merge
[xonotic/netradiant.git] / tools / quake3 / q3map2 / bsp.c
index c1d99060e3035d51a25eee6353011b40a6da5922..1ed218963b8e47feec10b87bebc9a8e429c30361 100644 (file)
@@ -319,6 +319,10 @@ void ProcessWorldModel( const char *portalFilePath, const char *lineFilePath ){
        /* 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 );
@@ -387,7 +391,9 @@ void ProcessWorldModel( const char *portalFilePath, const char *lineFilePath ){
        FloodAreas( tree );
 
        /* create drawsurfs for triangle models */
-       AddTriangleModels( e );
+       if ( !debugClip ) {
+               AddTriangleModels( e );
+       }
 
        /* create drawsurfs for surface models */
        AddEntitySurfaceModels( e );
@@ -950,6 +956,14 @@ int BSPMain( int argc, char **argv ){
                        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 ], "-snapmodelclip" ) ) {
+                       Sys_Printf( "Snapping model clip enabled\n" );
+                       snapModelClip = qtrue;
+               }
                else if ( !strcmp( argv[ i ], "-sRGBtex" ) ) {
                        texturesRGB = qtrue;
                        Sys_Printf( "Textures are in sRGB\n" );