From 742cb596e67a69317e552d5a365e8897e67fae38 Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 15 Apr 2021 11:45:17 +0200 Subject: [PATCH] Fix iw3 xanim not using different structs for dynamic indices --- src/Common/Game/IW3/IW3_Assets.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Common/Game/IW3/IW3_Assets.h b/src/Common/Game/IW3/IW3_Assets.h index 48fbda1e..4662baf3 100644 --- a/src/Common/Game/IW3/IW3_Assets.h +++ b/src/Common/Game/IW3/IW3_Assets.h @@ -177,15 +177,15 @@ namespace IW3 float time; }; - union XAnimDynamicIndices + typedef unsigned char ByteVec[3]; + typedef tdef_align(4) unsigned short UShortVec[3]; + + union XAnimDynamicIndicesTrans { char _1[1]; uint16_t _2[1]; }; - typedef unsigned char ByteVec[3]; - typedef tdef_align(4) unsigned short UShortVec[3]; - union XAnimDynamicFrames { ByteVec* _1; @@ -197,7 +197,7 @@ namespace IW3 float mins[3]; float size[3]; XAnimDynamicFrames frames; - XAnimDynamicIndices indices; + XAnimDynamicIndicesTrans indices; }; union XAnimPartTransData @@ -215,10 +215,16 @@ namespace IW3 typedef tdef_align(4) short XQuat[2]; + union XAnimDynamicIndicesQuat + { + char _1[1]; + uint16_t _2[1]; + }; + struct type_align(4) XAnimDeltaPartQuatDataFrames { XQuat *frames; - XAnimDynamicIndices indices; + XAnimDynamicIndicesQuat indices; }; union XAnimDeltaPartQuatData