mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-29 18:32:55 +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());
|
YbnXml.ValueTag(sb, indent, "UnkType", Unknown_3Ch.ToString());
|
||||||
if (Parent != null)
|
if (Parent != null)
|
||||||
{
|
{
|
||||||
YbnXml.SelfClosingTag(sb, indent, "CompositePosition " + FloatUtil.GetVector3XmlString(Position));
|
YbnXml.WriteRawArray(sb, Transform.ToArray(), indent, "CompositeTransform", "", FloatUtil.ToString, 4);
|
||||||
YbnXml.SelfClosingTag(sb, indent, "CompositeRotation " + FloatUtil.GetVector4XmlString(Orientation.ToVector4()));
|
|
||||||
YbnXml.SelfClosingTag(sb, indent, "CompositeScale " + FloatUtil.GetVector3XmlString(Scale));
|
|
||||||
if (!Parent.OwnerIsFragment)
|
if (!Parent.OwnerIsFragment)
|
||||||
{
|
{
|
||||||
YbnXml.StringTag(sb, indent, "CompositeFlags1", CompositeFlags1.Flags1.ToString());
|
YbnXml.StringTag(sb, indent, "CompositeFlags1", CompositeFlags1.Flags1.ToString());
|
||||||
@ -452,9 +450,8 @@ namespace CodeWalker.GameFiles
|
|||||||
Unknown_3Ch = (byte)Xml.GetChildUIntAttribute(node, "UnkType", "value");
|
Unknown_3Ch = (byte)Xml.GetChildUIntAttribute(node, "UnkType", "value");
|
||||||
if (Parent != null)
|
if (Parent != null)
|
||||||
{
|
{
|
||||||
Position = Xml.GetChildVector3Attributes(node, "CompositePosition");
|
Transform = new Matrix(Xml.GetChildRawFloatArray(node, "CompositeTransform"));
|
||||||
Orientation = Xml.GetChildVector4Attributes(node, "CompositeRotation").ToQuaternion();
|
TransformInv = Matrix.Invert(Transform);
|
||||||
Scale = Xml.GetChildVector3Attributes(node, "CompositeScale");
|
|
||||||
if (!Parent.OwnerIsFragment)
|
if (!Parent.OwnerIsFragment)
|
||||||
{
|
{
|
||||||
var f = new BoundCompositeChildrenFlags();
|
var f = new BoundCompositeChildrenFlags();
|
||||||
|
Loading…
Reference in New Issue
Block a user