summaryrefslogtreecommitdiff
path: root/indra/llcharacter/lljoint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcharacter/lljoint.cpp')
-rwxr-xr-xindra/llcharacter/lljoint.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index 3ad919072d..8365ab8eb1 100755
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -336,8 +336,22 @@ bool do_debug_joint(const std::string& name)
//--------------------------------------------------------------------
// setPosition()
//--------------------------------------------------------------------
-void LLJoint::setPosition( const LLVector3& pos )
+void LLJoint::setPosition( const LLVector3& requested_pos, bool apply_attachment_overrides )
{
+ LLVector3 pos(requested_pos);
+
+ LLVector3 active_override;
+ LLUUID mesh_id;
+ if (apply_attachment_overrides && m_attachmentOverrides.findActiveOverride(mesh_id,active_override))
+ {
+ if (pos != active_override && do_debug_joint(getName()))
+ {
+ LLScopedContextString str("setPosition");
+ LL_DEBUGS("Avatar") << " joint " << getName() << " requested_pos " << requested_pos
+ << " overriden by attachment " << active_override << LL_ENDL;
+ }
+ pos = active_override;
+ }
if ((pos != getPosition()) && do_debug_joint(getName()))
{
LLScopedContextString str("setPosition");