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 );
finishes a new bsp and writes to disk
*/
-void EndBSPFile( void )
+void EndBSPFile(qboolean do_write)
{
char path[ 1024 ];
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 );
+ }
}