summaryrefslogtreecommitdiff
path: root/indra/llcharacter/lljoint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcharacter/lljoint.cpp')
-rw-r--r--indra/llcharacter/lljoint.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index a3d5679f65..07fcd99701 100644
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -435,6 +435,19 @@ void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh
// return;
//}
+#if 0 // AXON MAINT-8554 - this may be overly restrictive for large models
+ LLVector3 constrained_pos = LLVector3(llclamp(pos[0],-LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET),
+ llclamp(pos[1],-LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET),
+ llclamp(pos[2],-LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET));
+ if (constrained_pos != pos)
+ {
+ LL_DEBUGS("Avatar") << mesh_id << " joint " << getName() << " attachment pos override constrained to "
+ << constrained_pos << " was " << pos << LL_ENDL;
+ }
+#else
+ LLVector3 constrained_pos = pos;
+#endif
+
LLVector3 before_pos;
LLUUID before_mesh_id;
bool has_active_override_before = hasAttachmentPosOverride( before_pos, before_mesh_id );
@@ -446,7 +459,7 @@ void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh
}
m_posBeforeOverrides = getPosition();
}
- m_attachmentPosOverrides.add(mesh_id,pos);
+ m_attachmentPosOverrides.add(mesh_id,constrained_pos);
LLVector3 after_pos;
LLUUID after_mesh_id;
hasAttachmentPosOverride(after_pos, after_mesh_id);
@@ -455,7 +468,7 @@ void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh
active_override_changed = true;
if (do_debug_joint(getName()))
{
- LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " addAttachmentPosOverride for mesh " << mesh_id << " pos " << pos << LL_ENDL;
+ LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " addAttachmentPosOverride for mesh " << mesh_id << " pos " << constrained_pos << LL_ENDL;
}
updatePos(av_info);
}
@@ -881,7 +894,7 @@ void LLJoint::setWorldRotation( const LLQuaternion& rot )
//--------------------------------------------------------------------
const LLVector3& LLJoint::getScale()
{
- return mXform.getScale();
+ return mXform.getScale();
}
//--------------------------------------------------------------------