merge branch work back into trunk
[xonotic/netradiant.git] / tools / quake3 / q3map2 / bsp.c
index 55b741abe7974f63244b26461bf4b5ca327389bc..aeaf73635c618d713f3e04fd87e105d2e482c17c 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -656,7 +657,9 @@ int BSPMain( int argc, char **argv )
        
        tempSource[ 0 ] = '\0';
        
-       /* set flares flag */
+       /* set standard game flags */
+       maxSurfaceVerts = game->maxSurfaceVerts;
+       maxSurfaceIndexes = game->maxSurfaceIndexes;
        emitFlares = game->emitFlares;
        
        /* process arguments */
@@ -757,11 +760,13 @@ int BSPMain( int argc, char **argv )
                }
                else if( !strcmp( argv[ i ],  "-mv" ) )
                {
-                       maxSurfaceVerts = atoi( argv[ i + 1 ] );
-                       if( maxSurfaceVerts < 3 )
-                               maxSurfaceVerts = 3;
+                       maxLMSurfaceVerts = atoi( argv[ i + 1 ] );
+                       if( maxLMSurfaceVerts < 3 )
+                               maxLMSurfaceVerts = 3;
+                       if( maxLMSurfaceVerts > maxSurfaceVerts )
+                               maxSurfaceVerts = maxLMSurfaceVerts;
                        i++;
-                       Sys_Printf( "Maximum per-surface vertex count set to %d\n", maxSurfaceVerts );
+                       Sys_Printf( "Maximum lightmapped surface vertex count set to %d\n", maxLMSurfaceVerts );
                }
                else if( !strcmp( argv[ i ],  "-mi" ) )
                {