diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-06-15 15:24:54 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-06-15 15:24:54 -0400 |
commit | d2302886bc132f5afe96612c8f13702775f0a303 (patch) | |
tree | ed7ff6d21559b8d73bd3d77211834f8e93d1edba /indra/newview/llvoavatar.cpp | |
parent | 27bb57126ce3849bd72d4bb56e659f25ac5a35db (diff) |
MAINT-6380, SL-399 - vertical flicker related to joint offsets for mPelvis. Having a joint offset for mPelvis is still a bad idea, but it won't cause as much flickering now.
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 7a3a72d789..0448fc6138 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5451,17 +5451,11 @@ void LLVOAvatar::addAttachmentPosOverridesForObject(LLViewerObject *vo) { pJoint->setId( currentId ); const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation(); - //Set the joint position - LLUUID curr_mesh_id; - LLVector3 joint_pos_before; - bool has_pos_before = pJoint->hasAttachmentPosOverride( joint_pos_before, curr_mesh_id ); - pJoint->addAttachmentPosOverride( jointPos, mesh_id, avString() ); + bool override_changed; + pJoint->addAttachmentPosOverride( jointPos, mesh_id, avString(), override_changed ); - LLVector3 joint_pos_after; - pJoint->hasAttachmentPosOverride( joint_pos_after, curr_mesh_id ); - - if (!has_pos_before || joint_pos_before != joint_pos_after) + if (override_changed) { //If joint is a pelvis then handle old/new pelvis to foot values if ( lookingForJoint == "mPelvis" ) @@ -5633,8 +5627,9 @@ void LLVOAvatar::resetJointPositionsOnDetach(const LLUUID& mesh_id) //Reset joints except for pelvis if ( pJoint ) { + bool dummy; // unused pJoint->setId( LLUUID::null ); - pJoint->removeAttachmentPosOverride(mesh_id, avString()); + pJoint->removeAttachmentPosOverride(mesh_id, avString(), dummy); } if ( pJoint && pJoint == pJointPelvis) { |