Fix index out of range error from the skin count > 4 fix

This commit is contained in:
KillzXGaming 2023-08-04 20:04:16 -04:00
parent deeff8e9a9
commit 396f9a9df2

View file

@ -1889,8 +1889,11 @@ namespace Bfres.Structs
// Save a v4 set each time v4Index hits 3 (.w)
if (v4Index == 3)
{
weights[v4ListIndex].Add(vWeight4);
boneInd[v4ListIndex].Add(vBoneInd4);
if (weights.Count > v4ListIndex)
weights[v4ListIndex].Add(vWeight4);
if (weights.Count > v4ListIndex)
boneInd[v4ListIndex].Add(vBoneInd4);
v4ListIndex++;
v4Index = 0;
continue;