From e54c0c2a967ce92d8514a91d3aeedf77a409cbfe Mon Sep 17 00:00:00 2001 From: SymphoniaLauren <77311570+SymphoniaLauren@users.noreply.github.com> Date: Sat, 23 Nov 2024 21:52:35 -0500 Subject: [PATCH] Update pak2.py Adding lipsynch fix --- pythonlib/formats/pak2.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pythonlib/formats/pak2.py b/pythonlib/formats/pak2.py index 8527d16..25d19da 100644 --- a/pythonlib/formats/pak2.py +++ b/pythonlib/formats/pak2.py @@ -89,7 +89,10 @@ def create_pak2(data: pak2_file)->bytes: offsets_new.append(insert_padded_chunk(output, data.chunks.theirsce)) # lipsync - offsets_new.append(insert_padded_chunk(output, data.chunks.lipsync)) + if data.chunks.lipsync: + offsets_new.append(insert_padded_chunk(output, data.chunks.lipsync)) + else: + offsets_new.append(0) # unused offsets_new.append(insert_padded_chunk(output, data.chunks.unused))