From 288852224a3769c66da72aef3e55f46474220d15 Mon Sep 17 00:00:00 2001 From: Robert Beckebans Date: Tue, 7 Nov 2023 21:11:57 +0100 Subject: [PATCH] convertMapToValve220 removes light flares --- neo/idlib/MapFile.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/neo/idlib/MapFile.cpp b/neo/idlib/MapFile.cpp index 84f21c03..44d21928 100644 --- a/neo/idlib/MapFile.cpp +++ b/neo/idlib/MapFile.cpp @@ -2974,8 +2974,6 @@ bool idMapFile::ConvertToValve220Format() } #endif - // TODO if light purge flare patches - bool isBrushModel = ( ent->GetNumPrimitives() > 0 ) && ( idStr::Icmp( model.c_str(), name.c_str() ) == 0 ); // is this oldschool brushes & patches? @@ -2994,6 +2992,13 @@ bool idMapFile::ConvertToValve220Format() removedOrigin = true; } + // purge flare patches from lights because we can't select lights in TrenchBroom + // that still have primitives + if( idStr::Icmp( classname, "light" ) == 0 ) + { + ent->RemovePrimitiveData(); + } + // convert brushes for( int i = 0; i < ent->GetNumPrimitives(); i++ ) {