Some more pak and model fixes

This commit is contained in:
KillzXGaming 2022-10-28 20:09:47 -04:00
parent db49432909
commit b6789443ce
2 changed files with 4 additions and 2 deletions

View file

@ -38,7 +38,8 @@ namespace DKCTF
/// Determines which variant of the file to parse. Switch reads strings and materials differently.
/// </summary>
bool IsSwitch => this.FileHeader.FormType == "SMDL" && this.FileHeader.VersionA >= 0x3A ||
this.FileHeader.FormType == "CMDL" && this.FileHeader.VersionA >= 0x35;
this.FileHeader.FormType == "CMDL" && this.FileHeader.VersionA >= 0x35 ||
this.FileHeader.FormType == "WMDL" && this.FileHeader.VersionA >= 0x36;
/// <summary>
/// The meta data header for parsing gpu buffers and decompressing.

View file

@ -98,7 +98,8 @@ namespace DKCTF
foreach (var c in CharFiles)
{
SkeletonFiles[c.Value.SkeletonFileID.ToString()].FileName = $"Characters/{c.Value.Name}/Models/{c.Value.SkeletonFileID}.skel";
if (SkeletonFiles.ContainsKey(c.Value.SkeletonFileID.ToString()))
SkeletonFiles[c.Value.SkeletonFileID.ToString()].FileName = $"Characters/{c.Value.Name}/Models/{c.Value.SkeletonFileID}.skel";
foreach (var m in c.Value.Models)
{