don't duplicate normals array

This commit is contained in:
in0finite 2019-10-17 19:17:10 +02:00
parent b14268f646
commit cd972e2dd3
2 changed files with 4 additions and 4 deletions

View file

@ -286,7 +286,7 @@ namespace SanAndreasUnity.Importing.Conversion
if (src.Normals != null)
{
mesh.normals = Utilities.F.ConvertArray( src.Normals, x => Types.Convert(x) );
mesh.normals = src.Normals;
}
if (src.Colours != null)

View file

@ -67,7 +67,7 @@ namespace SanAndreasUnity.Importing.RenderWareStream
public readonly UInt32 HasNormals;
public readonly UnityEngine.Vector3[] Vertices;
public readonly Vector3[] Normals;
public readonly UnityEngine.Vector3[] Normals;
public readonly Material[] Materials;
public readonly MaterialSplit[] MaterialSplits;
@ -143,10 +143,10 @@ namespace SanAndreasUnity.Importing.RenderWareStream
if ((Flags & GeometryFlag.Normals) != 0)
{
Normals = new Vector3[VertexCount];
Normals = new UnityEngine.Vector3[VertexCount];
for (var i = 0; i < VertexCount; ++i)
{
Normals[i] = new Vector3(reader);
Normals[i] = Conversion.Types.Convert(new Vector3(reader));
}
}