From be9a671217cf78195e888dd27710c26a63321817 Mon Sep 17 00:00:00 2001 From: Shiny Metagross <30511800+ShinyMetagross@users.noreply.github.com> Date: Tue, 16 Aug 2022 09:55:47 -0700 Subject: [PATCH] Update models_iqm.cpp - Fixed an issue with IQMs exported from blender that caused some issues in the blend weights --- src/common/models/models_iqm.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/models/models_iqm.cpp b/src/common/models/models_iqm.cpp index f684f8eed..b586e4e15 100644 --- a/src/common/models/models_iqm.cpp +++ b/src/common/models/models_iqm.cpp @@ -458,7 +458,11 @@ void IQMModel::LoadBlendWeights(IQMFileReader& reader, const IQMVertexArray& ver { for (FModelVertex& v : Vertices) { - v.SetBoneWeight(reader.ReadUByte(), reader.ReadUByte(), reader.ReadUByte(), reader.ReadUByte()); + int x = reader.ReadUByte(); + int y = reader.ReadUByte(); + int z = reader.ReadUByte(); + int w = reader.ReadUByte(); + v.SetBoneWeight(x, y, z, w); } } else if (vertexArray.Format == IQM_FLOAT && vertexArray.Size == 4)