diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp index 1b8045d8377a620bc71e9efebf7bd727d7094ed0..d894a2ce7424c7b33a9bf36d702e7820066877f4 100644 --- a/indra/newview/llattachmentsmgr.cpp +++ b/indra/newview/llattachmentsmgr.cpp @@ -71,7 +71,7 @@ void LLAttachmentsMgr::onIdle(void *) void LLAttachmentsMgr::onIdle() { // [RLVa:KB] - Checked: 2010-09-13 (RLVa-1.2.1c) | Added: RLVa-1.2.1c - if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) ) + if ( (mPendingAttachments.size()) && (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) ) { attachments_vec_t::iterator itPending = mPendingAttachments.begin(); while (itPending != mPendingAttachments.end()) diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index 4dae07fdf6286002a0996e5a63df530992889170..008b9b25f58c2766f853fe588ab81f3f2239a7f8 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -109,15 +109,16 @@ void RlvSettings::initClass() } } -#ifndef RLV_WORKAROUND_REZMULTIPLEATTACH BOOL RlvSettings::getEnableSharedWear() { + return FALSE; +/* // NOTE-RLVa: it's not proper but some code relies on the fact that getEnableSharedWear() returns FALSE if any attach point is locked return (rlvGetSettingBOOL(RLV_SETTING_ENABLESHAREDWEAR, FALSE)) && // "Enable Shared Wear" is toggled on and... (!gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)); // no attachment point is non-attachable or non-detachable +*/ } -#endif // RLV_WORKAROUND_REZMULTIPLEATTACH #ifdef RLV_EXTENSION_STARTLOCATION // Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-0.2.1d diff --git a/indra/newview/rlvcommon.h b/indra/newview/rlvcommon.h index f29fe3abb48ac09630066c5717b38daa9f7f9cce..ee1865320a1508b5981a3327f6fe9c696552ebf6 100644 --- a/indra/newview/rlvcommon.h +++ b/indra/newview/rlvcommon.h @@ -81,13 +81,6 @@ protected: static BOOL fShowNameTags; }; -#ifdef RLV_WORKAROUND_REZMULTIPLEATTACH -inline BOOL RlvSettings::getEnableSharedWear() -{ - return FALSE; -} -#endif // RLV_WORKAROUND_REZMULTIPLEATTACH - // ============================================================================ // RlvStrings // diff --git a/indra/newview/rlvdefines.h b/indra/newview/rlvdefines.h index 6ce241fd6e70d0f824e242791cbcb7c59c850101..707339fec8ddab4bca34179c01a2f19724aaa903 100644 --- a/indra/newview/rlvdefines.h +++ b/indra/newview/rlvdefines.h @@ -57,9 +57,6 @@ #define RLV_EXTENSION_CMD_TOUCHXXX // @touch:uuid=n|y, @touchworld[:<uuid>]=n|y, @touchattach[:<uuid>]=n|y, @touchud[:<uuid>]=n|y #endif // RLV_EXPERIMENTAL_CMDS -// Workarounds -#define RLV_WORKAROUND_REZMULTIPLEATTACH // See http://jira.secondlife.com/browse/SVC-5383 ; disables "Shared Wear" - // ============================================================================ // Defines // diff --git a/indra/newview/rlvhelper.cpp b/indra/newview/rlvhelper.cpp index 8073e4378476c950f5de292832b5e25ba3fc0b0b..abf8be7add1e88c9a2c049a179f9ed8a1d488a7f 100644 --- a/indra/newview/rlvhelper.cpp +++ b/indra/newview/rlvhelper.cpp @@ -17,6 +17,7 @@ #include "llviewerprecompiledheaders.h" #include "llagentwearables.h" #include "llappearancemgr.h" +#include "llattachmentsmgr.h" #include "llgesturemgr.h" #include "llnotifications.h" #include "llnotificationsutil.h" @@ -826,10 +827,8 @@ void RlvForceWear::done() continue; gAgentAvatarp->addAttachmentRequest(idItem); - LLSD payload; - payload["item_id"] = idItem; - payload["attachment_point"] = itAddAttachments->first; - LLNotifications::instance().forceResponse(LLNotification::Params("ReplaceAttachment").payload(payload), 0/*YES*/); + LLAttachmentsMgr::instance().addAttachment( + idItem, itAddAttachments->first & ~ATTACHMENT_ADD, itAddAttachments->first | ATTACHMENT_ADD); } } m_addAttachments.clear(); diff --git a/indra/newview/rlvlocks.cpp b/indra/newview/rlvlocks.cpp index d6b333b2d07a0364d7b9f50c79d7ab7c5a4dc1f9..c65ae55aca68502f4ed9274b95b24a967e304a33 100644 --- a/indra/newview/rlvlocks.cpp +++ b/indra/newview/rlvlocks.cpp @@ -15,10 +15,8 @@ */ #include "llviewerprecompiledheaders.h" -#include "llnotifications.h" -#include "lltooldraganddrop.h" +#include "llattachmentsmgr.h" #include "llviewerobjectlist.h" -#include "llviewerregion.h" #include "pipeline.h" #include "rlvhelper.h" @@ -410,28 +408,6 @@ bool RlvAttachmentLocks::verifyAttachmentLocks() // RlvAttachmentLockWatchdog member functions // -// Checked: 2010-09-15 (RLVa-1.2.1c) | Modified: RLVa-1.2.1c -void RlvAttachmentLockWatchdog::attach(const LLUUID& idItem, S32 idxAttachPt) -{ - const LLViewerInventoryItem* pItem = gInventory.getItem(idItem); - if (!pItem) - return; - - LLMessageSystem* pMsg = gMessageSystem; - pMsg->newMessageFast(_PREHASH_RezSingleAttachmentFromInv); - pMsg->nextBlockFast(_PREHASH_AgentData); - pMsg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - pMsg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - pMsg->nextBlockFast(_PREHASH_ObjectData); - pMsg->addUUIDFast(_PREHASH_ItemID, pItem->getUUID()); - pMsg->addUUIDFast(_PREHASH_OwnerID, pItem->getPermissions().getOwner()); - pMsg->addU8Fast(_PREHASH_AttachmentPt, idxAttachPt | ATTACHMENT_ADD); - pack_permissions_slam(pMsg, pItem->getFlags(), pItem->getPermissions()); - pMsg->addStringFast(_PREHASH_Name, pItem->getName()); - pMsg->addStringFast(_PREHASH_Description, pItem->getDescription()); - pMsg->sendReliable(gAgent.getRegion()->getHost()); -} - // Checked: 2010-07-28 (RLVa-1.2.0i) | Modified: RLVa-1.2.0i void RlvAttachmentLockWatchdog::detach(const LLViewerObject* pAttachObj) { @@ -664,7 +640,7 @@ void RlvAttachmentLockWatchdog::onSavedAssetIntoInventory(const LLUUID& idItem) { if ( (!itAttach->second.fAssetSaved) && (idItem == itAttach->second.idItem) ) { - attach(itAttach->second.idItem, itAttach->first); + LLAttachmentsMgr::instance().addAttachment(itAttach->second.idItem, itAttach->first, true, true); itAttach->second.tsAttach = LLFrameTimer::getElapsedSeconds(); } } @@ -712,7 +688,7 @@ BOOL RlvAttachmentLockWatchdog::onTimer() if (fAttach) { - attach(itAttach->second.idItem, itAttach->first); + LLAttachmentsMgr::instance().addAttachment(itAttach->second.idItem, itAttach->first, true, true); itAttach->second.tsAttach = tsCurrent; } diff --git a/indra/newview/rlvlocks.h b/indra/newview/rlvlocks.h index ecfe596a034d2e1dd6d22852aec30dd0b53b5d6f..1f5393e7572c4226142aae00f042dabbb1aac6d3 100644 --- a/indra/newview/rlvlocks.h +++ b/indra/newview/rlvlocks.h @@ -152,8 +152,7 @@ protected: * Member functions */ protected: - // NOTE: attach/detach do *not* respect attachment locks so use with care - void attach(const LLUUID& idItem, S32 idxAttachPt); + // NOTE: detach does *not* respect attachment locks so use with care void detach(const LLViewerObject* pAttachObj); void detach(S32 idxAttachPt, const LLViewerObject* pAttachObjExcept = NULL);