diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-11-02 14:10:56 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-11-02 14:10:56 -0500 |
commit | 86b1ee7703bb57c6b1e1c068cda02bfb9ed0721e (patch) | |
tree | 3f6b099fca5920cae4d93c4187ce614abfa9d83e /indra/newview/llvoavatarself.cpp | |
parent | 7335c6276865061d8b4a549b7cf29f8a8df929a0 (diff) |
Work in progress on attachment tracking.
Diffstat (limited to 'indra/newview/llvoavatarself.cpp')
-rw-r--r-- | indra/newview/llvoavatarself.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 758db538a2..44fd81f0d1 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1080,6 +1080,7 @@ const LLViewerJointAttachment *LLVOAvatarSelf::attachObject(LLViewerObject *view if (attachment->isObjectAttached(viewer_object)) { const LLUUID& attachment_id = viewer_object->getItemID(); + LLAppearanceManager::registerAttachment(attachment_id); LLViewerInventoryItem *item = gInventory.getItem(attachment_id); if (item) { @@ -1096,12 +1097,12 @@ const LLViewerJointAttachment *LLVOAvatarSelf::attachObject(LLViewerObject *view //virtual BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) { - const LLUUID item_id = viewer_object->getItemID(); + const LLUUID attachment_id = viewer_object->getItemID(); if (LLVOAvatar::detachObject(viewer_object)) { // the simulator should automatically handle permission revocation - stopMotionFromSource(item_id); + stopMotionFromSource(attachment_id); LLFollowCamMgr::setCameraActive(viewer_object->getID(), FALSE); LLViewerObject::const_child_list_t& child_list = viewer_object->getChildren(); @@ -1127,11 +1128,12 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) else { LLAppearanceManager::dumpCat(LLAppearanceManager::getCOF(),"Removing attachment link:"); - LLAppearanceManager::removeItemLinks(item_id, false); + LLAppearanceManager::removeItemLinks(attachment_id, false); + LLAppearanceManager::unregisterAttachment(attachment_id); } // BAP - needs to change for label to track link. - gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); + gInventory.addChangedMask(LLInventoryObserver::LABEL, attachment_id); gInventory.notifyObservers(); return TRUE; } |