Merge branch 'animesh' of git://github.com/Shyotl/SingularityViewer into animesh

This commit is contained in:
Lirusaito
2019-03-20 20:24:46 -04:00
2 changed files with 9 additions and 9 deletions

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;
}