mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-26 00:43:00 +08:00
Changed BoundComposite XML to use CompositeTransform Matrix instead of Position/Orientation/Scale
This commit is contained in:
parent
ac8ed59d0b
commit
7bb65ca063
@ -422,9 +422,7 @@ namespace CodeWalker.GameFiles
|
||||
YbnXml.ValueTag(sb, indent, "UnkType", Unknown_3Ch.ToString());
|
||||
if (Parent != null)
|
||||
{
|
||||
YbnXml.SelfClosingTag(sb, indent, "CompositePosition " + FloatUtil.GetVector3XmlString(Position));
|
||||
YbnXml.SelfClosingTag(sb, indent, "CompositeRotation " + FloatUtil.GetVector4XmlString(Orientation.ToVector4()));
|
||||
YbnXml.SelfClosingTag(sb, indent, "CompositeScale " + FloatUtil.GetVector3XmlString(Scale));
|
||||
YbnXml.WriteRawArray(sb, Transform.ToArray(), indent, "CompositeTransform", "", FloatUtil.ToString, 4);
|
||||
if (!Parent.OwnerIsFragment)
|
||||
{
|
||||
YbnXml.StringTag(sb, indent, "CompositeFlags1", CompositeFlags1.Flags1.ToString());
|
||||
@ -452,9 +450,8 @@ namespace CodeWalker.GameFiles
|
||||
Unknown_3Ch = (byte)Xml.GetChildUIntAttribute(node, "UnkType", "value");
|
||||
if (Parent != null)
|
||||
{
|
||||
Position = Xml.GetChildVector3Attributes(node, "CompositePosition");
|
||||
Orientation = Xml.GetChildVector4Attributes(node, "CompositeRotation").ToQuaternion();
|
||||
Scale = Xml.GetChildVector3Attributes(node, "CompositeScale");
|
||||
Transform = new Matrix(Xml.GetChildRawFloatArray(node, "CompositeTransform"));
|
||||
TransformInv = Matrix.Invert(Transform);
|
||||
if (!Parent.OwnerIsFragment)
|
||||
{
|
||||
var f = new BoundCompositeChildrenFlags();
|
||||
|
Loading…
Reference in New Issue
Block a user