char lightTargets[ MAX_SWITCHED_LIGHTS ][ 64 ];
int lightStyles[ MAX_SWITCHED_LIGHTS ];
+ /* -keeplights option: force lights to be kept and ignore what the map file says */
+ if (keepLights)
+ SetKeyValue(&entities[0], "_keepLights", "1");
+
/* ydnar: determine if we keep lights in the bsp */
if (KeyExists(&entities[ 0 ], "_keepLights") == qtrue)
{
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 );
+ }
}