SH-1777 Fix for "Prim" physics shape type not showing up on meshes with convex decompositions.

meow-7.2.2
Dave Parks 2011-06-08 14:31:22 -05:00
parent d6730fddf6
commit d9dfa9b870
1 changed files with 12 additions and 1 deletions

View File

@ -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)