1
0
mirror of synced 2025-02-20 20:51:35 +01:00

Always try to map materials even if use materials is unchecked

This commit is contained in:
KillzXGaming 2019-06-06 19:35:45 -04:00
parent 5a17b71d8f
commit 9c44e14597
4 changed files with 1 additions and 3 deletions

Binary file not shown.

View File

@ -1056,13 +1056,11 @@ namespace Bfres.Structs
shape.vertexAttributes = settings.CreateNewAttributes();
shape.BoneIndex = obj.BoneIndex;
if (UseMats)
if (obj.MaterialIndex + MatStartIndex < materials.Count)
shape.MaterialIndex = obj.MaterialIndex + MatStartIndex;
else
shape.MaterialIndex = 0;
if (shape.MaterialIndex >= materials.Count)
shape.MaterialIndex = 0;
shape.lodMeshes = obj.lodMeshes;