Minor bugfix.

This commit is contained in:
Shyotl
2019-03-20 15:34:23 -05:00
parent 5a9ad787d5
commit fd53ff014e
2 changed files with 9 additions and 9 deletions

View File

@@ -128,11 +128,11 @@ BOOL LLSkinJoint::setupSkinJoint( LLJoint *joint)
}
// compute the inverse root skin matrix
mRootToJointSkinOffset = totalSkinOffset((LLAvatarJoint*)joint);
mRootToJointSkinOffset = totalSkinOffset(mJoint);
mRootToJointSkinOffset = -mRootToJointSkinOffset;
//mRootToParentJointSkinOffset = totalSkinOffset((LLAvatarJoint*)joint->getParent());
mRootToParentJointSkinOffset = totalSkinOffset(getBaseSkeletonAncestor((LLAvatarJoint*)joint));
mRootToParentJointSkinOffset = totalSkinOffset(getBaseSkeletonAncestor(mJoint));
mRootToParentJointSkinOffset = -mRootToParentJointSkinOffset;
return TRUE;

View File

@@ -7762,6 +7762,13 @@ const LLViewerJointAttachment *LLVOAvatar::attachObject(LLViewerObject *viewer_o
<< (item ? item->getName() : "UNKNOWN") << " id " << item_id << LL_ENDL;
return 0;
}
// The object can already exist in the vector if it was attached while was already attached (causing a re-attach).
std::pair<LLViewerObject*, LLViewerJointAttachment*> const val(viewer_object, attachment);
if (std::find(mAttachedObjectsVector.begin(), mAttachedObjectsVector.end(), val) == mAttachedObjectsVector.end())
{
mAttachedObjectsVector.push_back(val);
}
if (!viewer_object->isAnimatedObject())
{
@@ -7776,13 +7783,6 @@ const LLViewerJointAttachment *LLVOAvatar::attachObject(LLViewerObject *viewer_o
LLSelectMgr::getInstance()->updatePointAt();
}
// The object can already exist in the vector if it was attached while was already attached (causing a re-attach).
std::pair<LLViewerObject*, LLViewerJointAttachment*> const val(viewer_object, attachment);
if (std::find(mAttachedObjectsVector.begin(), mAttachedObjectsVector.end(), val) == mAttachedObjectsVector.end())
{
mAttachedObjectsVector.push_back(val);
}
return attachment;
}