diff --git a/Assets/Scripts/OpenTS2/Files/Formats/DBPF/Scenegraph/Block/AnimResourceConstBlock.cs b/Assets/Scripts/OpenTS2/Files/Formats/DBPF/Scenegraph/Block/AnimResourceConstBlock.cs index cdd3eef..053edb9 100644 --- a/Assets/Scripts/OpenTS2/Files/Formats/DBPF/Scenegraph/Block/AnimResourceConstBlock.cs +++ b/Assets/Scripts/OpenTS2/Files/Formats/DBPF/Scenegraph/Block/AnimResourceConstBlock.cs @@ -58,6 +58,8 @@ namespace OpenTS2.Files.Formats.DBPF.Scenegraph.Block { public string TagName; + public ushort AnimType; + public int NumSharedChannels; public SharedChannel[] Channels; @@ -489,7 +491,7 @@ namespace OpenTS2.Files.Formats.DBPF.Scenegraph.Block // 2 ignored uint32s reader.ReadBytes(4 * 2); - var animType = reader.ReadUInt16(); + animTargets[i].AnimType = reader.ReadUInt16(); animTargets[i].NumSharedChannels = reader.ReadUInt16(); animTargets[i].NumIKChains = reader.ReadByte(); var channelType = reader.ReadByte(); diff --git a/Assets/Tests/OpenTS2/Files/Formats/DBPF/Scenegraph/Codecs/ScenegraphAnimationCodecTest.cs b/Assets/Tests/OpenTS2/Files/Formats/DBPF/Scenegraph/Codecs/ScenegraphAnimationCodecTest.cs index cecf772..a0040ff 100644 --- a/Assets/Tests/OpenTS2/Files/Formats/DBPF/Scenegraph/Codecs/ScenegraphAnimationCodecTest.cs +++ b/Assets/Tests/OpenTS2/Files/Formats/DBPF/Scenegraph/Codecs/ScenegraphAnimationCodecTest.cs @@ -126,6 +126,7 @@ public class ScenegraphAnimationCodecTest var skeletonTarget = animationAsset.AnimResource.AnimTargets[0]; Assert.That(skeletonTarget.TagName, Is.EqualTo("auskel")); + Assert.That(skeletonTarget.AnimType, Is.EqualTo(1)); var leftHandChannels = GetChannelsByName(skeletonTarget, "l_handcontrol0"); Assert.That(leftHandChannels.Length, Is.EqualTo(2));