]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/writebsp.c
Merge branch 'subdiv' into 'master'
[xonotic/netradiant.git] / tools / quake3 / q3map2 / writebsp.c
index 24692449f10318718589dddf213555c5cddc4b37..8ae5009821a17f3a479e5a7af3177b5dca2aea7b 100644 (file)
@@ -164,7 +164,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 )
@@ -402,9 +402,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" );
 
@@ -415,12 +413,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 );
        }
 }