YCD sequence processing progress, Import scenario chain orientation bug fix

This commit is contained in:
dexyfex
2017-10-03 20:24:33 +11:00
Unverified
parent f673abb1db
commit c19f3838ab
6 changed files with 343 additions and 140 deletions
+10 -1
View File
@@ -463,11 +463,20 @@ namespace CodeWalker.GameFiles
public ushort Z { get; set; }
public Vector3 Position { get { return ToVector3(); } set { FromVector3(value); } }
public Vector3 ToVector3()
{
const float usmax = (float)ushort.MaxValue;
const float usmax = ushort.MaxValue;
return new Vector3(X / usmax, Y / usmax, Z / usmax);
}
public void FromVector3(Vector3 v)
{
const float usmax = ushort.MaxValue;
X = (ushort)(v.X * usmax);
Y = (ushort)(v.Y * usmax);
Z = (ushort)(v.Z * usmax);
}
public override string ToString()
{