diff --git a/common/lc_meshloader.cpp b/common/lc_meshloader.cpp index 89c2caef..5787c538 100644 --- a/common/lc_meshloader.cpp +++ b/common/lc_meshloader.cpp @@ -1123,7 +1123,7 @@ lcMesh* lcLibraryMeshData::CreateMesh() if (DstSection.Texture) DstSection.Texture->AddRef(); - if (Mesh->mNumVertices < 0x10000) + if (Mesh->mIndexType == GL_UNSIGNED_SHORT) { DstSection.IndexOffset = NumIndices * 2; @@ -1294,7 +1294,7 @@ void lcLibraryMeshData::UpdateMeshBoundingBox(lcMesh* Mesh) lcMeshSection& Section = Lod.Sections[SectionIdx]; lcVector3 SectionMin(FLT_MAX, FLT_MAX, FLT_MAX), SectionMax(-FLT_MAX, -FLT_MAX, -FLT_MAX); - if (Mesh->mNumVertices < 0x10000) + if (Mesh->mIndexType == GL_UNSIGNED_SHORT) UpdateMeshSectionBoundingBox(Mesh, Section, SectionMin, SectionMax); else UpdateMeshSectionBoundingBox(Mesh, Section, SectionMin, SectionMax);