diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-06-07 15:06:49 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-06-07 15:06:49 -0400 |
commit | c978542a068578091eb43cab024bd929f0eaaedd (patch) | |
tree | 3954398b12ae595556d3a52872f41566303459b2 | |
parent | e46ac9d1440da85238599fb11e1da1ae0386b428 (diff) |
MAINT-6484 - make the attachment pos updates a bit smarter, so we don't flag the pelvis has having changed unless it has actually changed. Avoid excess calls to computeBodySize(), which can cause a vertical position glitch.
-rw-r--r-- | indra/newview/llvoavatar.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 0423f0e380..137d172c14 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5452,19 +5452,29 @@ void LLVOAvatar::addAttachmentPosOverridesForObject(LLViewerObject *vo) pJoint->setId( currentId ); 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) + { + //If joint is a pelvis then handle old/new pelvis to foot values + if ( lookingForJoint == "mPelvis" ) + { + pelvisGotSet = true; + } + } pJoint->addAttachmentPosOverride( jointPos, mesh_id, avString() ); - //If joint is a pelvis then handle old/new pelvis to foot values - if ( lookingForJoint == "mPelvis" ) - { - pelvisGotSet = true; - } } } if (pelvisZOffset != 0.0F) { + F32 curr_pelvis_fixup; + if (!hasPelvisFixup(curr_pelvis_fixup) || (curr_pelvis_fixup != pelvisZOffset)) + { + pelvisGotSet = true; + } addPelvisFixup( pelvisZOffset, mesh_id ); - pelvisGotSet = true; } } } |