]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/writebsp.c
Merge commit '7ca7a54fe6db387a22ea979e62ecbbb30f6d6d30' into garux-merge
[xonotic/netradiant.git] / tools / quake3 / q3map2 / writebsp.c
index 6b4ea592020e0f3d3934a4a469b2e8d9357df8bf..c3262a04fb2129994f944f3209126923edec0fdf 100644 (file)
@@ -75,8 +75,6 @@ int EmitShader( const char *shader, int *contentFlags, int *surfaceFlags ){
                }
        }
 
-       // i == numBSPShaders
-
        /* get shaderinfo */
        si = ShaderInfoForShader( shader );
 
@@ -169,7 +167,7 @@ void EmitLeaf( node_t *node ){
        {
                /* something is corrupting brushes */
                if ( (size_t) b < 256 ) {
-                       Sys_Printf( "WARNING: Node brush list corrupted (0x%08X)\n", b );
+                       Sys_FPrintf( SYS_WRN, "WARNING: Node brush list corrupted (0x%08X)\n", b );
                        break;
                }
                //%     if( b->guard != 0xDEADBEEF )
@@ -407,9 +405,7 @@ void BeginBSPFile( void ){
    finishes a new bsp and writes to disk
  */
 
-void EndBSPFile( qboolean do_write ){
-       char path[ 1024 ];
-
+void EndBSPFile( qboolean do_write, const char *BSPFilePath, const char *surfaceFilePath ){
 
        Sys_FPrintf( SYS_VRB, "--- EndBSPFile ---\n" );
 
@@ -420,12 +416,11 @@ void EndBSPFile( qboolean do_write ){
 
        if ( do_write ) {
                /* write the surface extra file */
-               WriteSurfaceExtraFile( source );
+               WriteSurfaceExtraFile( surfaceFilePath );
 
                /* write the bsp */
-               sprintf( path, "%s.bsp", source );
-               Sys_Printf( "Writing %s\n", path );
-               WriteBSPFile( path );
+               Sys_Printf( "Writing %s\n", BSPFilePath );
+               WriteBSPFile( BSPFilePath );
        }
 }