summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-xindra/newview/llvoavatar.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 979bf96151..22df9c43d7 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1811,6 +1811,7 @@ void LLVOAvatar::resetSkeleton()
// Stop all animations
// Clear all attachment pos overrides
+ clearAttachmentPosOverrides();
// Preserve state of tweakable params
@@ -1841,6 +1842,7 @@ void LLVOAvatar::resetSkeleton()
#endif
// Restore attachment pos overrides
+ rebuildAttachmentPosOverrides();
// Restart animations
}
@@ -5328,9 +5330,44 @@ void LLVOAvatar::clearAttachmentPosOverrides()
pJoint->clearAttachmentPosOverrides();
}
}
+
+ // Attachment points
+ for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin();
+ iter != mAttachmentPoints.end();
+ ++iter)
+ {
+ LLViewerJointAttachment *attachment_pt = (*iter).second;
+ if (attachment_pt)
+ {
+ attachment_pt->clearAttachmentPosOverrides();
+ }
+ }
}
//-----------------------------------------------------------------------------
+// rebuildAttachmentPosOverrides
+//-----------------------------------------------------------------------------
+void LLVOAvatar::rebuildAttachmentPosOverrides()
+{
+ LLScopedContextString str("rebuildAttachmentPosOverrides " + getFullname());
+
+ // Attachment points
+ for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
+ iter != mAttachmentPoints.end();
+ ++iter)
+ {
+ LLViewerJointAttachment *attachment_pt = (*iter).second;
+ if (attachment_pt)
+ {
+ for (LLViewerJointAttachment::attachedobjs_vec_t::iterator at_it = attachment_pt->mAttachedObjects.begin();
+ at_it != attachment_pt->mAttachedObjects.end(); ++at_it)
+ {
+ addAttachmentPosOverridesForObject(*at_it);
+ }
+ }
+ }
+}
+//-----------------------------------------------------------------------------
// addAttachmentPosOverridesForObject
//-----------------------------------------------------------------------------
void LLVOAvatar::addAttachmentPosOverridesForObject(LLViewerObject *vo)