diff --git a/AltTool/ResourceBuilder.cs b/AltTool/ResourceBuilder.cs index 5869fa6..ac9056d 100644 --- a/AltTool/ResourceBuilder.cs +++ b/AltTool/ResourceBuilder.cs @@ -274,6 +274,7 @@ public static void BuildResourceAltv(string outputFolder, string collectionName) switch (componentTypeID) { + case 2: case 7: nextPropMask = 11; break; case 5: @@ -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) { @@ -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'; @@ -523,6 +526,7 @@ public static void BuildResourceSingle(string outputFolder, string collectionNam switch (componentTypeID) { + case 2: case 7: nextPropMask = 11; break; case 5: @@ -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) { @@ -814,6 +818,7 @@ public static void BuildResourceFivem(string outputFolder, string collectionName switch (componentTypeID) { + case 2: case 7: nextPropMask = 11; break; case 5: @@ -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) {