mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-30 07:50:22 +00:00
don't duplicate normals array
This commit is contained in:
parent
b14268f646
commit
cd972e2dd3
2 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue