parses a single entity out of a map file
*/
-static qboolean ParseMapEntity( qboolean onlyLights )
+static qboolean ParseMapEntity( qboolean onlyLights, qboolean noCollapseGroups )
{
epair_t *ep;
const char *classname, *value;
AdjustBrushesForOrigin( mapEnt );
/* group_info entities are just for editor grouping (fixme: leak!) */
- if( !Q_stricmp( "group_info", classname ) )
+ if( !noCollapseGroups && !Q_stricmp( "group_info", classname ) )
{
numEntities--;
return qtrue;
}
/* group entities are just for editor convenience, toss all brushes into worldspawn */
- if( funcGroup )
+ if( !noCollapseGroups && funcGroup )
{
MoveBrushesToWorld( mapEnt );
numEntities--;
loads a map file into a list of entities
*/
-void LoadMapFile( char *filename, qboolean onlyLights )
+void LoadMapFile( char *filename, qboolean onlyLights, qboolean noCollapseGroups )
{
FILE *file;
brush_t *b;
buildBrush = AllocBrush( MAX_BUILD_SIDES );
/* parse the map file */
- while( ParseMapEntity( onlyLights ) );
+ while( ParseMapEntity( onlyLights, noCollapseGroups ) );
/* light loading */
if( onlyLights )