]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/bspfile_abstract.c
Merge branch 'NateEag-master-patch-12920' into 'master'
[xonotic/netradiant.git] / tools / quake3 / q3map2 / bspfile_abstract.c
index 55d358f0e69b65c9d5aa859bcb5036f12beb3d98..0530fc1f4b1cf0afe92f64c7ed400825d8f982e9 100644 (file)
@@ -391,8 +391,7 @@ void PartialLoadBSPFile( const char *filename ){
        PartialLoadIBSPFile( filename );
 
        /* PartialSwapBSPFile() */
-       int i, j;
-       shaderInfo_t    *si;
+       int i;
 
        /* shaders (don't swap the name) */
        for ( i = 0; i < numBSPShaders ; i++ )
@@ -447,7 +446,12 @@ void PrintBSPFileSizes( void ){
        if ( numEntities <= 0 ) {
                ParseEntities();
        }
-
+       int patchCount = 0;
+       bspDrawSurface_t *s;
+       for ( s = bspDrawSurfaces; s != bspDrawSurfaces + numBSPDrawSurfaces; ++s ){
+               if ( s->surfaceType == MST_PATCH )
+                       ++patchCount;
+       }
        /* note that this is abstracted */
        Sys_Printf( "Abstracted BSP file components (*actual sizes may differ)\n" );
 
@@ -480,6 +484,8 @@ void PrintBSPFileSizes( void ){
 
        Sys_Printf( "%9d drawsurfaces  %9d *\n",
                                numBSPDrawSurfaces, (int) ( numBSPDrawSurfaces * sizeof( *bspDrawSurfaces ) ) );
+       Sys_Printf( "%9d patchsurfaces       \n",
+                               patchCount );
        Sys_Printf( "%9d drawverts     %9d *\n",
                                numBSPDrawVerts, (int) ( numBSPDrawVerts * sizeof( *bspDrawVerts ) ) );
        Sys_Printf( "%9d drawindexes   %9d\n",
@@ -628,10 +634,9 @@ void InjectCommandLine( char **argv, int beginArgs, int endArgs ){
        char *sentinel = newCommandLine + sizeof( newCommandLine ) - 1;
        int i;
 
-if (nocmdline)
-{
-       return;
-}
+       if ( nocmdline ){
+               return;
+       }
        previousCommandLine = ValueForKey( &entities[0], "_q3map2_cmdline" );
        if ( previousCommandLine && *previousCommandLine ) {
                inpos = previousCommandLine;