diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-04-26 17:07:04 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-04-26 17:07:04 -0400 |
commit | 041433483ad64c399ffcdf95906eb8e83109ba75 (patch) | |
tree | f477346c29f8da895f119427d50a29934973b549 /indra | |
parent | e769e76cd3975ea0a936df1130f0b60b592438a4 (diff) |
SL-375 - tolerance and debug output tweaks
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index e6df4f4fd1..9bfb402b03 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5315,6 +5315,13 @@ void LLVOAvatar::clearAttachmentPosOverrides() } } +bool above_joint_pos_threshold(const LLVector3& diff) +{ + return !diff.isNull(); + //const F32 max_joint_pos_offset = 0.0001f; // 0.1 mm + //return diff.lengthSquared() > max_joint_pos_offset * max_joint_pos_offset; +} + //----------------------------------------------------------------------------- // addAttachmentPosOverridesForObject //----------------------------------------------------------------------------- @@ -5375,7 +5382,7 @@ void LLVOAvatar::addAttachmentPosOverridesForObject(LLViewerObject *vo) { pJoint->setId( currentId ); const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation(); - if ((jointPos-pJoint->getDefaultPosition()).isNull()) + if (!above_joint_pos_threshold(jointPos-pJoint->getDefaultPosition())) { LL_DEBUGS("Avatar") << "Attachment pos override ignored for " << pJoint->getName() << ", pos " << jointPos << " is same as default pos" << LL_ENDL; @@ -5408,7 +5415,10 @@ void LLVOAvatar::addAttachmentPosOverridesForObject(LLViewerObject *vo) postPelvisSetRecalc(); } - showAttachmentPosOverrides(); + if (isSelf()) + { + showAttachmentPosOverrides(); + } } //----------------------------------------------------------------------------- |