]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - plugins/mapq3/write.cpp
Q3map2:
[xonotic/netradiant.git] / plugins / mapq3 / write.cpp
index 7a95458644ce22909f52518521b484ce60f064ef..f7becfeebdaf99c5a56eff86fdf37ff73072d7d7 100644 (file)
@@ -70,6 +70,10 @@ bool pre( scene::Node& node ) const {
 
        Entity* entity = Node_getEntity( node );
        if ( entity != 0 ) {
+               if( entity->isContainer() && Node_getTraversable( node )->empty() && !string_equal( entity->getKeyValue( "classname" ), "worldspawn" ) ){
+                       globalErrorStream() << "discarding empty group entity: # = " << g_count_entities << "; classname = " << entity->getKeyValue( "classname" ) << "\n";
+                       return false;
+               }
                m_writer.writeToken( "//" );
                m_writer.writeToken( "entity" );
                m_writer.writeUnsigned( g_count_entities++ );