From d321835ea3d3a8d0617e7dc7f2cae317dc9a6aae Mon Sep 17 00:00:00 2001 From: HENDRIX-ZT2 Date: Tue, 19 Sep 2023 21:15:59 +0200 Subject: [PATCH] Improve ms2 versioning --- generated/formats/ms2/__init__.py | 5 +++++ source/formats/ms2/__init__.py | 5 +++++ version.txt | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/generated/formats/ms2/__init__.py b/generated/formats/ms2/__init__.py index 110686ee8..68fe3806f 100644 --- a/generated/formats/ms2/__init__.py +++ b/generated/formats/ms2/__init__.py @@ -347,6 +347,11 @@ def save(self, filepath): # for modelstreams, trailing _ is ignored self.basename = os.path.splitext(self.name)[0].rstrip("_") logging.info("Pre-writing buffers") + # just a quick hack to support WH + for model_info in self.model_infos: + if hasattr(model_info.bone_info, "bone_limits"): + if self.context.version < 53: + model_info.bone_info.bone_limits.index = 255 self.info.mdl_2_count = len(self.model_infos) self.update_names() self.update_buffer_0_bytes() diff --git a/source/formats/ms2/__init__.py b/source/formats/ms2/__init__.py index 321d0627d..4e93d76b6 100644 --- a/source/formats/ms2/__init__.py +++ b/source/formats/ms2/__init__.py @@ -346,6 +346,11 @@ def save(self, filepath): # for modelstreams, trailing _ is ignored self.basename = os.path.splitext(self.name)[0].rstrip("_") logging.info("Pre-writing buffers") + # just a quick hack to support WH + for model_info in self.model_infos: + if hasattr(model_info.bone_info, "bone_limits"): + if self.context.version < 53: + model_info.bone_info.bone_limits.index = 255 self.info.mdl_2_count = len(self.model_infos) self.update_names() self.update_buffer_0_bytes() diff --git a/version.txt b/version.txt index 8bda499e5..e831709f5 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -fc5f62433 - Tue Sep 19 20:28:08 2023 +0200 \ No newline at end of file +0a4f3856d - Tue Sep 19 20:31:41 2023 +0200 \ No newline at end of file