@@ -12,7 +12,6 @@ signal build_failed()
1212
1313signal unwrap_uv2_complete ()
1414
15- var print_profiling_data := false
1615var map_file := "" setget set_map_file
1716var inverse_scale_factor := 16.0
1817var entity_fgd := preload ("res://addons/qodot/game-definitions/fgd/qodot_fgd.tres" )
@@ -27,6 +26,8 @@ var texture_wads := [] setget set_texture_wads
2726var material_file_extension := ".tres"
2827var default_material := SpatialMaterial .new ()
2928var uv_unwrap_texel_size := 1.0
29+ var print_profiling_data := false
30+ var use_trenchbroom_group_hierarchy := false
3031var tree_attach_batch_size := 16
3132var set_owner_batch_size := 16
3233
@@ -109,6 +110,7 @@ func _get_property_list() -> Array:
109110 QodotUtil .property_dict ('uv_unwrap_texel_size' , TYPE_REAL ),
110111 QodotUtil .category_dict ('Build' ),
111112 QodotUtil .property_dict ('print_profiling_data' , TYPE_BOOL ),
113+ QodotUtil .property_dict ('use_trenchbroom_group_hierarchy' , TYPE_BOOL ),
112114 QodotUtil .property_dict ('tree_attach_batch_size' , TYPE_INT ),
113115 QodotUtil .property_dict ('set_owner_batch_size' , TYPE_INT )
114116 ]
@@ -411,7 +413,7 @@ func build_entity_nodes() -> Array:
411413 if entity_definition .spawn_type == QodotFGDSolidClass .SpawnType .MERGE_WORLDSPAWN :
412414 entity_nodes .append (null )
413415 continue
414- elif entity_definition .spawn_type == QodotFGDSolidClass .SpawnType .GROUP :
416+ elif use_trenchbroom_group_hierarchy and entity_definition .spawn_type == QodotFGDSolidClass .SpawnType .GROUP :
415417 should_add_child = false
416418 if entity_definition .node_class != "" :
417419 node = ClassDB .instance (entity_definition .node_class )
@@ -454,6 +456,9 @@ func build_worldspawn_layer_nodes() -> Array:
454456 return worldspawn_layer_nodes
455457
456458func resolve_group_hierarchy () -> void :
459+ if not use_trenchbroom_group_hierarchy :
460+ return
461+
457462 var group_entities := {}
458463 var owner_entities := {}
459464
0 commit comments