summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprep linden <prep@lindenlab.com>2011-08-10 12:50:12 -0400
committerprep linden <prep@lindenlab.com>2011-08-10 12:50:12 -0400
commit20c3d8485480487d38500c9b18846ca96d1d6f83 (patch)
tree7ae382f955abc076d088e6deb87349c4b22ffba7
parentb2da13f46b1d5bb2977f06a6c10ec550920b17a0 (diff)
Submitted correction for logic error: if decomp fails for single hull only execute fallback code
-rw-r--r--indra/newview/llmeshrepository.cpp43
1 files changed, 22 insertions, 21 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 2473f2d610..1518fde66b 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -3144,32 +3144,33 @@ void LLPhysicsDecomp::doDecompositionSingleHull()
llwarns << "Could not execute decomposition stage when attempting to create single hull." << llendl;
make_box(mCurRequest);
}
+ else
+ {
+ mMutex->lock();
+ mCurRequest->mHull.clear();
+ mCurRequest->mHull.resize(1);
+ mCurRequest->mHullMesh.clear();
+ mMutex->unlock();
- mMutex->lock();
- mCurRequest->mHull.clear();
- mCurRequest->mHull.resize(1);
- mCurRequest->mHullMesh.clear();
- mMutex->unlock();
-
- std::vector<LLVector3> p;
- LLCDHull hull;
+ std::vector<LLVector3> p;
+ LLCDHull hull;
- // if LLConvexDecomposition is a stub, num_hulls should have been set to 0 above, and we should not reach this code
- decomp->getSingleHull(&hull);
+ // if LLConvexDecomposition is a stub, num_hulls should have been set to 0 above, and we should not reach this code
+ decomp->getSingleHull(&hull);
- const F32* v = hull.mVertexBase;
+ const F32* v = hull.mVertexBase;
- for (S32 j = 0; j < hull.mNumVertices; ++j)
- {
- LLVector3 vert(v[0], v[1], v[2]);
- p.push_back(vert);
- v = (F32*) (((U8*) v) + hull.mVertexStrideBytes);
- }
+ for (S32 j = 0; j < hull.mNumVertices; ++j)
+ {
+ LLVector3 vert(v[0], v[1], v[2]);
+ p.push_back(vert);
+ v = (F32*) (((U8*) v) + hull.mVertexStrideBytes);
+ }
- mMutex->lock();
- mCurRequest->mHull[0] = p;
- mMutex->unlock();
-
+ mMutex->lock();
+ mCurRequest->mHull[0] = p;
+ mMutex->unlock();
+ }
#else
setMeshData(mesh, false);