diff options
author | Dave Parks <davep@lindenlab.com> | 2011-06-08 14:31:22 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-06-08 14:31:22 -0500 |
commit | d9dfa9b8707b3bf68d7c5cd03a6ca738be7f891f (patch) | |
tree | 446a71af8a9f8893c934b1bf1a2ed7f6e9e6d17a /indra | |
parent | d6730fddf6d8e711ca5af6e72a92734a70f86209 (diff) |
SH-1777 Fix for "Prim" physics shape type not showing up on meshes with convex decompositions.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llmeshrepository.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 29904c579c..3545b5128a 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -2716,7 +2716,18 @@ void LLMeshRepository::buildHull(const LLVolumeParams& params, S32 detail) bool LLMeshRepository::hasPhysicsShape(const LLUUID& mesh_id) { LLSD mesh = mThread->getMeshHeader(mesh_id); - return mesh.has("physics_mesh") && mesh["physics_mesh"].has("size") && (mesh["physics_mesh"]["size"].asInteger() > 0); + if (mesh.has("physics_mesh") && mesh["physics_mesh"].has("size") && (mesh["physics_mesh"]["size"].asInteger() > 0)) + { + return true; + } + + LLModel::Decomposition* decomp = getDecomposition(mesh_id); + if (decomp && !decomp->mHull.empty()) + { + return true; + } + + return false; } LLSD& LLMeshRepository::getMeshHeader(const LLUUID& mesh_id) |