summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-08-04 16:20:04 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-08-04 16:20:04 +0100
commit72010fba4d07c768b0f5edd5dc56bf89a98a9985 (patch)
tree55b0be597c77c14dc24665d403fa6dd6f74d1f7d
parenta57170724344842e26b8cd0fa4a47c24efa834c5 (diff)
SL-718 - bug fixes for animated objects as attachments: Pause all associated avatars when selecting/editing. Don't apply joint positions to the attached avatar on login.
-rw-r--r--indra/newview/llappearancemgr.cpp5
-rw-r--r--indra/newview/llselectmgr.cpp17
-rw-r--r--indra/newview/llvovolume.cpp2
3 files changed, 21 insertions, 3 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index c928cf0601..d58d03d68d 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -880,7 +880,10 @@ void LLWearableHoldingPattern::onAllComplete()
++it)
{
LLViewerObject *objectp = *it;
- gAgentAvatarp->addAttachmentOverridesForObject(objectp);
+ if (!objectp->isAnimatedObject())
+ {
+ gAgentAvatarp->addAttachmentOverridesForObject(objectp);
+ }
}
// Add new attachments to match those requested.
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index b6b7d5265b..3e8d8883e0 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -6760,12 +6760,27 @@ void LLSelectMgr::pauseAssociatedAvatars()
if (mSelectedObjects->mSelectType == SELECT_TYPE_ATTACHMENT &&
isAgentAvatarValid() && object->getParent() != NULL)
{
- mPauseRequests.push_back(gAgentAvatarp->requestPause());
+ if (object->isAnimatedObject())
+ {
+ // Is an animated object attachment.
+ // Pause both the control avatar and the avatar it's attached to.
+ if (object->getControlAvatar())
+ {
+ mPauseRequests.push_back(object->getControlAvatar()->requestPause());
+ }
+ mPauseRequests.push_back(gAgentAvatarp->requestPause());
+ }
+ else
+ {
+ // Is a regular attachment. Pause the avatar it's attached to.
+ mPauseRequests.push_back(gAgentAvatarp->requestPause());
+ }
}
else
{
if (object && object->isAnimatedObject() && object->getControlAvatar())
{
+ // Is a non-attached animated object. Pause the control avatar.
mPauseRequests.push_back(object->getControlAvatar()->requestPause());
}
}
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 04e2827182..15fc995ecf 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -5023,7 +5023,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
bool is_rigged = false;
// AXON handle NPC case
- if (rigged && pAvatarVO)
+ if (rigged && pAvatarVO && !vobj->isAnimatedObject())
{
pAvatarVO->addAttachmentOverridesForObject(vobj);
if (!LLApp::isExiting() && pAvatarVO->isSelf() && debugLoggingEnabled("AvatarAttachments"))