1
0
mirror of synced 2025-01-19 01:14:08 +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++;
}*/
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];
ushort face1 = GMXHeader.Meshes[i].IndexGroup.Indices[f + 1];
ushort face2 = GMXHeader.Meshes[i].IndexGroup.Indices[f + 2];
msh.faces.AddRange(new List<int>() { face2, face1, face0, });
msh.faces.AddRange(new int[3]
{
GMXHeader.Meshes[i].IndexGroup.Indices[f++],
GMXHeader.Meshes[i].IndexGroup.Indices[f++],
GMXHeader.Meshes[i].IndexGroup.Indices[f]
});
}
renderedMesh.lodMeshes.Add(msh);