summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2015-03-27 19:38:53 +0200
committerandreykproductengine <akleshchev@productengine.com>2015-03-27 19:38:53 +0200
commit0818a0189c4ebadce44686a43d1bda176626d7c2 (patch)
treee9a88afd2001768131e384f53a96110bc0f558d3 /indra/llprimitive
parent051052b141ef5c2c3a2f08a9d69b7b982386c8c4 (diff)
MAINT-4983 submodel limit fix
Diffstat (limited to 'indra/llprimitive')
-rw-r--r--indra/llprimitive/lldaeloader.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp
index 2ec627d722..272ebb7552 100644
--- a/indra/llprimitive/lldaeloader.cpp
+++ b/indra/llprimitive/lldaeloader.cpp
@@ -2326,7 +2326,11 @@ bool LLDAELoader::loadModelsFromDomMesh(domMesh* mesh, std::vector<LLModel*>& mo
int submodelID = 0;
// remove all faces that definitely won't fit into one model and submodel limit
- ret->setNumVolumeFaces((submodel_limit + 1) * LL_SCULPT_MESH_MAX_FACES);
+ U32 face_limit = (submodel_limit + 1) * LL_SCULPT_MESH_MAX_FACES;
+ if (face_limit < volume_faces)
+ {
+ ret->setNumVolumeFaces(face_limit);
+ }
LLVolume::face_list_t remainder;
do