summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-02-26 18:58:02 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-02-26 18:58:02 +0200
commit6861adcb3188991867f6b6e101e72ce466b1745b (patch)
treeb6079cbeeae8c1a33f816443b2a4b3a7df6fe71f /indra
parenta985e54f03ed05e1b8920da695c4533870dd3463 (diff)
SL-10616 No moving animation if wear linked objects in edit mode and change avatar
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llselectmgr.cpp32
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());
}
+
}
}