BFRES : Prevent adding attributes if original attributes are kept and present.

This commit is contained in:
KillzXGaming 2020-06-15 20:15:27 -04:00
parent aaa98afa8e
commit 952095877d

View file

@ -1020,7 +1020,7 @@ namespace Bfres.Structs
} }
public void CreateBoneList(STGenericObject ob, FMDL mdl, bool ForceSkinCount, int ForcedSkinAmount = 4) public void CreateBoneList(STGenericObject ob, FMDL mdl, bool ForceSkinCount, int ForcedSkinAmount = 4)
{ {
if (ForceSkinCount && !ob.HasIndices && VertexSkinCount != 0) if (ForceSkinCount && !ob.HasIndices && VertexSkinCount != 0 && !vertexAttributes.Any(x => x.Name == "_i0"))
{ {
var attributeIndex = new FSHP.VertexAttribute(); var attributeIndex = new FSHP.VertexAttribute();
attributeIndex.Format = ResGFX.AttribFormat.Format_8_8_8_8_UInt; attributeIndex.Format = ResGFX.AttribFormat.Format_8_8_8_8_UInt;