Skip to content

Commit c0eb2ea

Browse files
committed
Correct certain CUtlHashtable types generation
1 parent 24f6e95 commit c0eb2ea

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

generator_scripts/generate_cpp.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,11 +422,15 @@ def process_class(self, class_obj: ObjectDefinition):
422422

423423
for (dep, needs_definition) in class_obj.get_member_deps():
424424

425-
# Ugly hack to make CUtlLeanVector work with hl2sdk
426425
if self.has_flag(ArgsFlags.SupplyingSDK):
426+
# Ugly hack to make CUtlLeanVector work with hl2sdk
427427
if dep.type == 'atomic' and (dep.name.startswith('CUtlLeanVector') or dep.name.startswith('CUtlVectorFixedGrowable')):
428428
for (subdep, subneeds_def) in dep.get_deps():
429429
self.process_subtype(subdep, True)
430+
431+
# Force define second argument of the hashtable as it expects it to be defined
432+
if dep.type == 'atomic' and dep.name.startswith('CUtlHashtable'):
433+
self.process_subtype(dep.template_list[1].subtype, True)
430434

431435
self.process_subtype(dep, needs_definition)
432436

0 commit comments

Comments
 (0)