diff options
author | AndreyL ProductEngine <andreylproductengine@lindenlab.com> | 2015-09-04 21:06:22 +0300 |
---|---|---|
committer | AndreyL ProductEngine <andreylproductengine@lindenlab.com> | 2015-09-04 21:06:22 +0300 |
commit | 67757ddd5b1196ebab004095e202d9dc012f520f (patch) | |
tree | 8956d5ad788235a45ce020232e53be14fc23031d /indra/newview/llspatialpartition.cpp | |
parent | 70136a7e3d1ce1600ecc1b607923b6dd408b8d0e (diff) |
MAINT-5416 FIXED Cannot right-click a rigged mesh that's worn
--HG--
branch : maint-5416
Diffstat (limited to 'indra/newview/llspatialpartition.cpp')
-rwxr-xr-x | indra/newview/llspatialpartition.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 5e342099d7..22944493c9 100755 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -3770,8 +3770,9 @@ public: LLVector4a *mTangent; LLDrawable* mHit; BOOL mPickTransparent; + BOOL mPickRigged; - LLOctreeIntersect(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent, + LLOctreeIntersect(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent, BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) : mStart(start), mEnd(end), @@ -3781,7 +3782,8 @@ public: mNormal(normal), mTangent(tangent), mHit(NULL), - mPickTransparent(pick_transparent) + mPickTransparent(pick_transparent), + mPickRigged(pick_rigged) { } @@ -3864,9 +3866,9 @@ public: if (vobj->isAvatar()) { LLVOAvatar* avatar = (LLVOAvatar*) vobj; - if (avatar->isSelf() && LLFloater::isVisible(gFloaterTools)) + if ((mPickRigged) || ((avatar->isSelf()) && (LLFloater::isVisible(gFloaterTools)))) { - LLViewerObject* hit = avatar->lineSegmentIntersectRiggedAttachments(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mTangent); + LLViewerObject* hit = avatar->lineSegmentIntersectRiggedAttachments(mStart, mEnd, -1, mPickTransparent, mPickRigged, mFaceHit, &intersection, mTexCoord, mNormal, mTangent); if (hit) { mEnd = intersection; @@ -3882,7 +3884,7 @@ public: } } - if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mTangent)) + if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1, mPickTransparent, mPickRigged, mFaceHit, &intersection, mTexCoord, mNormal, mTangent)) { mEnd = intersection; // shorten ray so we only find CLOSER hits if (mIntersection) @@ -3900,7 +3902,8 @@ public: } LL_ALIGN_POSTFIX(16); LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, + BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, // return the face hit LLVector4a* intersection, // return the intersection point LLVector2* tex_coord, // return the texture coordinates of the intersection point @@ -3909,7 +3912,7 @@ LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector4a& start, co ) { - LLOctreeIntersect intersect(start, end, pick_transparent, face_hit, intersection, tex_coord, normal, tangent); + LLOctreeIntersect intersect(start, end, pick_transparent, pick_rigged, face_hit, intersection, tex_coord, normal, tangent); LLDrawable* drawable = intersect.check(mOctree); return drawable; |