Skip to content

Commit dabf39e

Browse files
committed
Fix missing TrenchBroom group hierarchy setting
1 parent b38b2d8 commit dabf39e

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

addons/qodot/src/nodes/qodot_map.gd

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ signal build_failed()
1212

1313
signal unwrap_uv2_complete()
1414

15-
var print_profiling_data := false
1615
var map_file := "" setget set_map_file
1716
var inverse_scale_factor := 16.0
1817
var entity_fgd := preload("res://addons/qodot/game-definitions/fgd/qodot_fgd.tres")
@@ -27,6 +26,8 @@ var texture_wads := [] setget set_texture_wads
2726
var material_file_extension := ".tres"
2827
var default_material := SpatialMaterial.new()
2928
var uv_unwrap_texel_size := 1.0
29+
var print_profiling_data := false
30+
var use_trenchbroom_group_hierarchy := false
3031
var tree_attach_batch_size := 16
3132
var 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

456458
func resolve_group_hierarchy() -> void:
459+
if not use_trenchbroom_group_hierarchy:
460+
return
461+
457462
var group_entities := {}
458463
var owner_entities := {}
459464

addons/qodot/src/util/qodot_dependencies.gd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,10 @@ static func check_dependency(http_request: HTTPRequest, dependency: String, url:
9191
print("Dependency satisfied")
9292
return true
9393

94-
var dependency_comps = dependency.split('/')
94+
var dependency_comps = dependency.split("/")
9595
dependency_comps.resize(dependency_comps.size() - 1)
96-
var dependency_dir = dependency_comps.join('/')
96+
var dependency_dir = dependency_comps.join("/")
97+
9798
if not dir.dir_exists(dependency_dir):
9899
dir.make_dir_recursive(dependency_dir)
99100

0 commit comments

Comments
 (0)