summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <andreylproductengine@lindenlab.com>2015-09-04 21:06:22 +0300
committerAndreyL ProductEngine <andreylproductengine@lindenlab.com>2015-09-04 21:06:22 +0300
commit67757ddd5b1196ebab004095e202d9dc012f520f (patch)
tree8956d5ad788235a45ce020232e53be14fc23031d /indra/newview/llvovolume.cpp
parent70136a7e3d1ce1600ecc1b607923b6dd408b8d0e (diff)
MAINT-5416 FIXED Cannot right-click a rigged mesh that's worn
--HG-- branch : maint-5416
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rwxr-xr-xindra/newview/llvovolume.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 4b0e4514a0..46e853c1e0 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3883,7 +3883,7 @@ LLVector3 LLVOVolume::volumeDirectionToAgent(const LLVector3& dir) const
}
-BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp,
+BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp,
LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
{
@@ -3902,9 +3902,9 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
if (mDrawable->isState(LLDrawable::RIGGED))
{
- if (LLFloater::isVisible(gFloaterTools) && getAvatar()->isSelf())
+ if ((pick_rigged) || ((getAvatar()->isSelf()) && (LLFloater::isVisible(gFloaterTools))))
{
- updateRiggedVolume();
+ updateRiggedVolume(true);
volume = mRiggedVolume;
transform = false;
}
@@ -4083,10 +4083,8 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
bool LLVOVolume::treatAsRigged()
{
- return LLFloater::isVisible(gFloaterTools) &&
- isAttachment() &&
- getAvatar() &&
- getAvatar()->isSelf() &&
+ return isSelected() &&
+ isAttachment() &&
mDrawable.notNull() &&
mDrawable->isState(LLDrawable::RIGGED);
}
@@ -4105,12 +4103,12 @@ void LLVOVolume::clearRiggedVolume()
}
}
-void LLVOVolume::updateRiggedVolume()
+void LLVOVolume::updateRiggedVolume(bool force_update)
{
//Update mRiggedVolume to match current animation frame of avatar.
//Also update position/size in octree.
- if (!treatAsRigged())
+ if ((!force_update) && (!treatAsRigged()))
{
clearRiggedVolume();