diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp index bae777c1d..5164daf22 100644 --- a/indra/newview/llviewerjointattachment.cpp +++ b/indra/newview/llviewerjointattachment.cpp @@ -164,6 +164,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) if (isObjectAttached(object)) { llinfos << "(same object re-attached)" << llendl; + LL_INFOS("Attachment") << object->getID() << " ("<getAttachmentPointName()<<") OBJECT re-attached" << llendl; removeObject(object); // Pass through anyway to let setupDrawable() // re-connect object to the joint correctly @@ -178,6 +179,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) if (getAttachedObject(object->getAttachmentItemID())) { llinfos << "(same object re-attached)" << llendl; + LL_INFOS("Attachment") << object->getID() << " ("<getAttachmentPointName()<<") ITEM re-attached" << llendl; object->markDead(); // If this happens to be attached to self, then detach. diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 8a448ea18..5b0a1e364 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -1769,6 +1769,22 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, LLViewerObject *sent_parentp = gObjectList.findObject(parent_uuid); + if(isAttachment()) + { + llassert_always(gAgentID.notNull()); + if(parent_uuid == gAgentID) + { + static std::map state_map; + std::map::iterator it = state_map.find(getID()); + + if(it == state_map.end() || (!it->second && sent_parentp)) + { + it->second = sent_parentp != NULL; + LL_INFOS("Attachment") << getID() << " ("<mDrawable) { + if(isSelf()) + { + LL_INFOS("Attachment") << childp->getID() << " ("<getAttachmentPointName()<<") attached." << llendl; + llassert(std::find(mPendingAttachment.begin(), mPendingAttachment.end(), childp) == mPendingAttachment.end()); + } attachObject(childp); } else { + if(isSelf()) + { + LL_INFOS("Attachment") << childp->getID() << " ("<getAttachmentPointName()<<") pending." << llendl; + } mPendingAttachment.push_back(childp); } } @@ -6892,6 +6901,10 @@ void LLVOAvatar::lazyAttach() { if (mPendingAttachment[i]->mDrawable) { + if(isSelf()) + { + LL_INFOS("Attachment") << mPendingAttachment[i]->getID() << " ("<getAttachmentPointName()<<") done pending. attached." << llendl; + } attachObject(mPendingAttachment[i]); } else