]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/bsp.c
Q3map2:
[xonotic/netradiant.git] / tools / quake3 / q3map2 / bsp.c
index 98d399c932e34c1a8ac5d010687c280d84acfebe..2edf9f5d95538b9a6cbd42d266b82e60a6836e25 100644 (file)
@@ -319,6 +319,10 @@ void ProcessWorldModel( void ){
        /* 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( void ){
        FloodAreas( tree );
 
        /* create drawsurfs for triangle models */
-       AddTriangleModels( e );
+       if ( !debugClip ) {
+               AddTriangleModels( e );
+       }
 
        /* create drawsurfs for surface models */
        AddEntitySurfaceModels( e );
@@ -945,6 +951,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" );