]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
don't write the bsp twice when pseudo compiling
authorRudolf Polzer <divverent@alientrap.org>
Sat, 9 Oct 2010 19:29:15 +0000 (21:29 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 9 Oct 2010 19:29:15 +0000 (21:29 +0200)
tools/quake3/q3map2/bsp.c
tools/quake3/q3map2/main.c
tools/quake3/q3map2/q3map2.h
tools/quake3/q3map2/writebsp.c

index f0763eb7f19892f0e51f5e6f98702e321b656b1d..7901979237dc0b8bfc7a676e15d33e3f26410dcd 100644 (file)
@@ -978,7 +978,7 @@ int BSPMain( int argc, char **argv )
        ProcessAdvertisements();
 
        /* finish and write bsp */
-       EndBSPFile();
+       EndBSPFile(qtrue);
        
        /* remove temp map source file if appropriate */
        if( strlen( tempSource ) > 0)
index a7f94325bfeab64b7856854513aed05d0c6c3616..0789723d6fe7403ce1d44b96969bccb6da2aa826 100644 (file)
@@ -1511,7 +1511,7 @@ void PseudoCompileBSP(qboolean need_tree)
                EmitBrushes(entity->brushes, &entity->firstBrush, &entity->numBrushes );
                EndModel(entity, node);
        }
-       EndBSPFile();
+       EndBSPFile(qfalse);
 }
 
 /*
index 28a94a33fad06e9994515eb172f8388480f05dca..bf0d5c663b60817a98789aeabaf78f9497597e92 100644 (file)
@@ -1615,7 +1615,7 @@ void                                              SetLightStyles( void );
 int                                                    EmitShader( const char *shader, int *contentFlags, int *surfaceFlags );
 
 void                                           BeginBSPFile( void );
-void                                           EndBSPFile( void );
+void                                           EndBSPFile( qboolean do_write );
 void                                           EmitBrushes( brush_t *brushes, int *firstBrush, int *numBrushes );
 void                                           EmitFogs( void );
 
index 2ef8962b688cfad06dcb7ad864e9fb5a1a97813f..2e6e67a0e73d06857089a7477d63c186229812c2 100644 (file)
@@ -399,7 +399,7 @@ EndBSPFile()
 finishes a new bsp and writes to disk
 */
 
-void EndBSPFile( void )
+void EndBSPFile(qboolean do_write)
 {
        char    path[ 1024 ];
        
@@ -411,13 +411,16 @@ void EndBSPFile( void )
        numBSPEntities = numEntities;
        UnparseEntities();
        
-       /* write the surface extra file */
-       WriteSurfaceExtraFile( source );
-       
-       /* write the bsp */
-       sprintf( path, "%s.bsp", source );
-       Sys_Printf( "Writing %s\n", path );
-       WriteBSPFile( path );
+       if(do_write)
+       {
+               /* write the surface extra file */
+               WriteSurfaceExtraFile( source );
+
+               /* write the bsp */
+               sprintf( path, "%s.bsp", source );
+               Sys_Printf( "Writing %s\n", path );
+               WriteBSPFile( path );
+       }
 }