diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-06-07 15:47:18 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-06-07 15:47:18 -0400 |
commit | 593d925831c6f2210db3a387db21277940ac06b0 (patch) | |
tree | b07774bbe8b908f1816df4746b96d32fdd091d15 /indra/newview/llvoavatar.cpp | |
parent | c978542a068578091eb43cab024bd929f0eaaedd (diff) |
MAINT-6484 - more on pelvis update detection when attachments get updated.
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 137d172c14..7a3a72d789 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5453,9 +5453,15 @@ void LLVOAvatar::addAttachmentPosOverridesForObject(LLViewerObject *vo) const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation(); //Set the joint position LLUUID curr_mesh_id; - LLVector3 curr_joint_pos; - if (!pJoint->hasAttachmentPosOverride( curr_joint_pos, curr_mesh_id ) || - curr_joint_pos != jointPos) + LLVector3 joint_pos_before; + bool has_pos_before = pJoint->hasAttachmentPosOverride( joint_pos_before, curr_mesh_id ); + + pJoint->addAttachmentPosOverride( jointPos, mesh_id, avString() ); + + LLVector3 joint_pos_after; + pJoint->hasAttachmentPosOverride( joint_pos_after, curr_mesh_id ); + + if (!has_pos_before || joint_pos_before != joint_pos_after) { //If joint is a pelvis then handle old/new pelvis to foot values if ( lookingForJoint == "mPelvis" ) @@ -5463,18 +5469,21 @@ void LLVOAvatar::addAttachmentPosOverridesForObject(LLViewerObject *vo) pelvisGotSet = true; } } - pJoint->addAttachmentPosOverride( jointPos, mesh_id, avString() ); } } if (pelvisZOffset != 0.0F) { - F32 curr_pelvis_fixup; - if (!hasPelvisFixup(curr_pelvis_fixup) || (curr_pelvis_fixup != pelvisZOffset)) + F32 pelvis_fixup_before; + bool has_fixup_before = hasPelvisFixup(pelvis_fixup_before); + addPelvisFixup( pelvisZOffset, mesh_id ); + F32 pelvis_fixup_after; + hasPelvisFixup(pelvis_fixup_after); // Don't have to check bool here because we just added it... + if (!has_fixup_before || (pelvis_fixup_before != pelvis_fixup_after)) { pelvisGotSet = true; } - addPelvisFixup( pelvisZOffset, mesh_id ); + } } } |