Skip to content

Commit

Permalink
Test setting texid "properly"?
Browse files Browse the repository at this point in the history
  • Loading branch information
DurtyFree committed Apr 21, 2021
1 parent 32e0778 commit 2469e19
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions altClothTool.App/Builders/Base/ResourceBuilderBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ private List<MUnk_254518642> GetTexDataForCloth(ClothData clothData)
return items;
}

/// TODO DURTY: verify if its really based on index? Shouldnt be like this actually, because its connected to skin tone or something
private static byte GetTexIdByDrawableType(ClothData clothData, int index)
// TODO DURTY: verify if its really based on index? Shouldnt be like this actually, because its connected to skin tone or something
private byte GetTexIdByDrawableType(ClothData clothData, int index = 1)
{
byte texId = (byte) index;
switch (clothData.DrawableType)
Expand All @@ -75,6 +75,9 @@ private static byte GetTexIdByDrawableType(ClothData clothData, int index)
case ClothNameResolver.DrawableTypes.Shoes:
texId = 0;
break;
case ClothNameResolver.DrawableTypes.Mask:
texId = 1;
break;
}
return texId;
}
Expand Down Expand Up @@ -169,13 +172,7 @@ protected MCComponentInfo GenerateYmtPedComponentItem(ClothData clothData, ref M
}
};

byte texId = (byte) (clothData.MainPath.EndsWith("_u.ydd") ? 0 : 1);

if (clothData.DrawableType == ClothNameResolver.DrawableTypes.Mask)
{
texId = 1;
}

byte texId = GetTexIdByDrawableType(clothData);
foreach (string texPath in clothData.Textures)
{
MUnk_1036962405 texInfo = new MUnk_1036962405
Expand Down

0 comments on commit 2469e19

Please sign in to comment.