Skip to content

Commit

Permalink
Fixed hairs
Browse files Browse the repository at this point in the history
  • Loading branch information
indilo53 committed Feb 16, 2020
1 parent 32cad96 commit e23ca36
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions AltTool/ResourceBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ public static void BuildResourceAltv(string outputFolder, string collectionName)

switch (componentTypeID)
{
case 2:
case 7:
nextPropMask = 11; break;
case 5:
Expand All @@ -292,9 +293,9 @@ public static void BuildResourceAltv(string outputFolder, string collectionName)
textureDescription.PropMask = nextPropMask;
textureDescription.Unk_2806194106 = (byte)(cd.fpModelPath != "" ? 1 : 0);

byte texId = (byte)((componentTypeID != 4 && componentTypeID != 6) ? 0 : 1);
string postfix = (componentTypeID != 4 && componentTypeID != 6) ? "u" : "r";
string ytdPostfix = (componentTypeID != 4 && componentTypeID != 6) ? "uni" : "whi";
byte texId = (byte)(cd.mainPath.EndsWith("_u.ydd") ? 0 : 1);
string postfix = cd.mainPath.EndsWith("_u.ydd") ? "u" : "r";
string ytdPostfix = cd.mainPath.EndsWith("_u.ydd") ? "uni" : "whi";

foreach (string texPath in cd.textures)
{
Expand Down Expand Up @@ -405,6 +406,8 @@ public static void BuildResourceAltv(string outputFolder, string collectionName)
string componentNumerics = currentPropIndex.ToString().PadLeft(3, '0');
string prefix = cd.GetPrefix();

var ydr = new YdrFile();

File.Copy(cd.mainPath, outputFolder + "\\stream\\" + folderNames[sexNr] + "_p.rpf\\" + prefixes[sexNr] + "freemode_01_p_" + prefixes[sexNr] + collectionName + "\\" + prefix + "_" + componentNumerics + ".ydd", true);

char offsetLetter = 'a';
Expand Down Expand Up @@ -523,6 +526,7 @@ public static void BuildResourceSingle(string outputFolder, string collectionNam

switch (componentTypeID)
{
case 2:
case 7:
nextPropMask = 11; break;
case 5:
Expand All @@ -541,9 +545,9 @@ public static void BuildResourceSingle(string outputFolder, string collectionNam
textureDescription.PropMask = nextPropMask;
textureDescription.Unk_2806194106 = (byte)(cd.fpModelPath != "" ? 1 : 0);

byte texId = (byte)((componentTypeID != 4 && componentTypeID != 6) ? 0 : 1);
string postfix = (componentTypeID != 4 && componentTypeID != 6) ? "u" : "r";
string ytdPostfix = (componentTypeID != 4 && componentTypeID != 6) ? "uni" : "whi";
byte texId = (byte)(cd.mainPath.EndsWith("_u.ydd") ? 0 : 1);
string postfix = cd.mainPath.EndsWith("_u.ydd") ? "u" : "r";
string ytdPostfix = cd.mainPath.EndsWith("_u.ydd") ? "uni" : "whi";

foreach (string texPath in cd.textures)
{
Expand Down Expand Up @@ -814,6 +818,7 @@ public static void BuildResourceFivem(string outputFolder, string collectionName

switch (componentTypeID)
{
case 2:
case 7:
nextPropMask = 11; break;
case 5:
Expand All @@ -832,9 +837,9 @@ public static void BuildResourceFivem(string outputFolder, string collectionName
textureDescription.PropMask = nextPropMask;
textureDescription.Unk_2806194106 = (byte)(cd.fpModelPath != "" ? 1 : 0);

byte texId = (byte)((componentTypeID != 4 && componentTypeID != 6) ? 0 : 1);
string postfix = (componentTypeID != 4 && componentTypeID != 6) ? "u" : "r";
string ytdPostfix = (componentTypeID != 4 && componentTypeID != 6) ? "uni" : "whi";
byte texId = (byte)(cd.mainPath.EndsWith("_u.ydd") ? 0 : 1);
string postfix = cd.mainPath.EndsWith("_u.ydd") ? "u" : "r";
string ytdPostfix = cd.mainPath.EndsWith("_u.ydd") ? "uni" : "whi";

foreach (string texPath in cd.textures)
{
Expand Down

0 comments on commit e23ca36

Please sign in to comment.