Read Vector3D manually

This commit is contained in:
Matt Nadareski
2024-11-27 21:33:24 -05:00
parent e6d118e8cc
commit ea535fa393
2 changed files with 10 additions and 6 deletions

View File

@@ -222,9 +222,11 @@ namespace SabreTools.Serialization.Deserializers
var vertices = new List<Vector3D>();
while (data.Position < offset + length)
{
var vertex = data.ReadType<Vector3D>();
if (vertex == null)
break;
var vertex = new Vector3D();
vertex.X = data.ReadSingle();
vertex.Y = data.ReadSingle();
vertex.Z = data.ReadSingle();
vertices.Add(vertex);
}

View File

@@ -349,9 +349,11 @@ namespace SabreTools.Serialization.Deserializers
var vertices = new List<Vector3D>();
while (data.Position < offset + length)
{
var vertex = data.ReadType<Vector3D>();
if (vertex == null)
break;
var vertex = new Vector3D();
vertex.X = data.ReadSingle();
vertex.Y = data.ReadSingle();
vertex.Z = data.ReadSingle();
vertices.Add(vertex);
}