1
0
mirror of synced 2025-01-31 12:23:52 +01:00

Fix GMX faces

This commit is contained in:
KillzXGaming 2019-07-05 15:33:42 -04:00
parent ab80051646
commit e124d446e8
3 changed files with 7 additions and 6 deletions

Binary file not shown.

View File

@ -122,13 +122,14 @@ namespace FirstPlugin
VertexID++; VertexID++;
}*/ }*/
for (int f = 0; f < GMXHeader.Meshes[i].IndexGroup.Indices.Length / 3; f++) for (int f = 0; f < GMXHeader.Meshes[i].IndexGroup.Indices.Length; f++)
{ {
ushort face0 = GMXHeader.Meshes[i].IndexGroup.Indices[f + 0]; msh.faces.AddRange(new int[3]
ushort face1 = GMXHeader.Meshes[i].IndexGroup.Indices[f + 1]; {
ushort face2 = GMXHeader.Meshes[i].IndexGroup.Indices[f + 2]; GMXHeader.Meshes[i].IndexGroup.Indices[f++],
GMXHeader.Meshes[i].IndexGroup.Indices[f++],
msh.faces.AddRange(new List<int>() { face2, face1, face0, }); GMXHeader.Meshes[i].IndexGroup.Indices[f]
});
} }
renderedMesh.lodMeshes.Add(msh); renderedMesh.lodMeshes.Add(msh);