Fixed loading pieces with more than 64k verts.

This commit is contained in:
leo 2016-05-28 18:18:00 +00:00
parent 61006184d1
commit 73c7607ca6

View file

@ -1126,7 +1126,7 @@ lcMesh* lcPiecesLibrary::CreateMesh(PieceInfo* Info, lcLibraryMeshData& MeshData
if (MergeSection.Lod) if (MergeSection.Lod)
{ {
lcuint32 BaseVertex = DstSection.Texture ? BaseTexturedVertices[LodIdx] : BaseVertices[LodIdx]; lcuint32 BaseVertex = DstSection.Texture ? BaseTexturedVertices[LodIdx] : BaseVertices[LodIdx];
lcLibraryMeshSection* SrcSection = MergeSection.Shared; lcLibraryMeshSection* SrcSection = MergeSection.Lod;
for (int IndexIdx = 0; IndexIdx < SrcSection->mIndices.GetSize(); IndexIdx++) for (int IndexIdx = 0; IndexIdx < SrcSection->mIndices.GetSize(); IndexIdx++)
*Index++ = BaseVertex + SrcSection->mIndices[IndexIdx]; *Index++ = BaseVertex + SrcSection->mIndices[IndexIdx];