mirror of
https://github.com/LazyDuchess/OpenTS2.git
synced 2025-01-22 08:11:47 -05:00
Load anim type for anim targets and test
This commit is contained in:
parent
5b696e64d9
commit
fc3cd33a91
2 changed files with 4 additions and 1 deletions
|
@ -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();
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue