1
0
mirror of synced 2025-01-31 12:23:52 +01:00

Fix the bone index for rigid indices in the list

This commit is contained in:
KillzXGaming 2019-05-11 11:28:33 -04:00
parent 53e64e1288
commit cdc9f2d697
3 changed files with 6 additions and 2 deletions

Binary file not shown.

View File

@ -78,6 +78,8 @@ namespace FirstPlugin
}
}
BoneIndex = 0;
//Rigid Indices come after smooth indices. Start from the last smooth index
ushort RigidIndex = (ushort)(SmoothIndices.Count);
foreach (BfresBone bn in fmdl.Skeleton.bones)
@ -89,10 +91,12 @@ namespace FirstPlugin
Bone.RigidMatrixIndex = bn.RigidMatrixIndex;
RigidIndices.Add(BoneIndex);
}
BoneIndex++;
}
//Rigid indices at the end
var AllIndices = SmoothIndices.Concat(RigidIndices).ToList();
//Rigid indices at the end
var AllIndices = SmoothIndices.Concat(RigidIndices).ToList();
model.Skeleton.MatrixToBoneList = AllIndices.ToArray();
model.Skeleton.InverseModelMatrices = SmoothMatrices;