Update models_iqm.cpp

- Fixed an issue with IQMs exported from blender that caused some issues in the blend weights
This commit is contained in:
Shiny Metagross 2022-08-16 09:55:47 -07:00 committed by Christoph Oelckers
parent ab7be9b4a4
commit be9a671217

View file

@ -458,7 +458,11 @@ void IQMModel::LoadBlendWeights(IQMFileReader& reader, const IQMVertexArray& ver
{ {
for (FModelVertex& v : Vertices) 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) else if (vertexArray.Format == IQM_FLOAT && vertexArray.Size == 4)