diff options
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r-- | indra/newview/llselectmgr.cpp | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 02093fa6bd..56be902254 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6804,8 +6804,28 @@ void LLSelectMgr::pauseAssociatedAvatars() mSelectedObjects->mSelectType = getSelectTypeForObject(object); + bool is_attached = false; if (mSelectedObjects->mSelectType == SELECT_TYPE_ATTACHMENT && - isAgentAvatarValid() && object->getParent() != NULL) + isAgentAvatarValid()) + { + // Selection can be obsolete, confirm that this is an attachment + LLViewerObject* parent = (LLViewerObject*)object->getParent(); + while (parent != NULL) + { + if (parent->isAvatar()) + { + is_attached = true; + break; + } + else + { + parent = (LLViewerObject*)parent->getParent(); + } + } + } + + + if (is_attached) { if (object->isAnimatedObject()) { @@ -6823,14 +6843,12 @@ void LLSelectMgr::pauseAssociatedAvatars() mPauseRequests.push_back(gAgentAvatarp->requestPause()); } } - else + else if (object && object->isAnimatedObject() && object->getControlAvatar()) { - if (object && object->isAnimatedObject() && object->getControlAvatar()) - { - // Is a non-attached animated object. Pause the control avatar. - mPauseRequests.push_back(object->getControlAvatar()->requestPause()); - } + // Is a non-attached animated object. Pause the control avatar. + mPauseRequests.push_back(object->getControlAvatar()->requestPause()); } + } } |