From 7708c2ad095876924492097d0134fc5de1e916f9 Mon Sep 17 00:00:00 2001 From: Kitty Barnett <develop@catznip.com> Date: Mon, 5 Dec 2016 23:49:17 +0100 Subject: [PATCH] Disable the attachment kill fix for now (see changeset 040adc63b7ff) --HG-- branch : RLVa --- indra/newview/llviewerjointattachment.cpp | 12 +-- indra/newview/llviewermessage.cpp | 14 +-- indra/newview/llviewerwindow.cpp | 2 +- indra/newview/llvoavatarself.cpp | 106 +++++++++++----------- indra/newview/llvoavatarself.h | 18 ++-- 5 files changed, 76 insertions(+), 76 deletions(-) diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp index e3479640721..d3cd3331261 100644 --- a/indra/newview/llviewerjointattachment.cpp +++ b/indra/newview/llviewerjointattachment.cpp @@ -175,12 +175,12 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) if (isObjectAttached(object)) { LL_INFOS() << "(same object re-attached)" << LL_ENDL; -// [SL:KB] - Patch: Appearance-TeleportAttachKill | Checked: Catznip-4.0 - if ( (object->permYouOwner()) && (gAgentAvatarp) ) - { - gAgentAvatarp->removePendingDetach(object->getID()); - } -// [/SL:KB] +//// [SL:KB] - Patch: Appearance-TeleportAttachKill | Checked: Catznip-4.0 +// if ( (object->permYouOwner()) && (gAgentAvatarp) ) +// { +// gAgentAvatarp->removePendingDetach(object->getID()); +// } +//// [/SL:KB] removeObject(object); // Pass through anyway to let setupDrawable() // re-connect object to the joint correctly diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 5680f5fc747..bfd10e28abd 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5080,13 +5080,13 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data) LLViewerObject *objectp = gObjectList.findObject(id); if (objectp) { -// [SL:KB] - Patch: Appearance-TeleportAttachKill | Checked: Catznip-4.0 - if ( (objectp->isAttachment()) && (gAgentAvatarp) && (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE) && (objectp->permYouOwner()) ) - { - gAgentAvatarp->addPendingDetach(objectp->getRootEdit()->getID()); - continue; - } -// [/SL:KB] +//// [SL:KB] - Patch: Appearance-TeleportAttachKill | Checked: Catznip-4.0 +// if ( (objectp->isAttachment()) && (gAgentAvatarp) && (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE) && (objectp->permYouOwner()) ) +// { +// gAgentAvatarp->addPendingDetach(objectp->getRootEdit()->getID()); +// continue; +// } +//// [/SL:KB] // Display green bubble on kill if ( gShowObjectUpdates ) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 2e5cc4f0eb2..08e4a34e0bc 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4137,7 +4137,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de } // [RLVa:KB] - Checked: RLVa-1.2.0 - if ( (found) && ((gTeleportDisplay) || ((rlv_handler_t::isEnabled()) && (found) && (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)))) ) + if ( (found) && ((gTeleportDisplay) || ((rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)))) ) { // Allow picking if: // - the drag-and-drop tool is active (allows inventory offers) diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 16cbdbeeafb..58f1a21942e 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2939,56 +2939,56 @@ void LLVOAvatarSelf::dumpWearableInfo(LLAPRFile& outfile) apr_file_printf( file, "\n</wearable_info>\n" ); } -// [SL:KB] - Patch: Appearance-TeleportAttachKill | Checked: Catznip-4.0 -void LLVOAvatarSelf::addPendingDetach(const LLUUID& idObject) -{ - if (mPendingObjectDetach.end() == std::find(mPendingObjectDetach.begin(), mPendingObjectDetach.end(), idObject)) - mPendingObjectDetach.push_back(idObject); - - if ((!mPendingObjectDetach.empty()) && (!mTeleportDoneConn.connected())) - mTeleportDoneConn = LLViewerParcelMgr::instance().setTeleportDoneCallback(boost::bind(&LLVOAvatarSelf::onTeleportDone, this)); -} - -bool LLVOAvatarSelf::isPendingDetach(const LLUUID& idObject) const -{ - return mPendingObjectDetach.end() != std::find(mPendingObjectDetach.begin(), mPendingObjectDetach.end(), idObject); -} - -void LLVOAvatarSelf::removePendingDetach(const LLUUID& idObject) -{ - auto itPendingDetach = std::find(mPendingObjectDetach.begin(), mPendingObjectDetach.end(), idObject); - if (mPendingObjectDetach.end() != itPendingDetach) - mPendingObjectDetach.erase(itPendingDetach); - - if (mPendingObjectDetach.empty()) - mTeleportDoneConn.disconnect(); -} - -void LLVOAvatarSelf::onTeleportDone() -{ - mTeleportDoneConn.disconnect(); - doAfterInterval(boost::bind(&LLVOAvatarSelf::checkPendingDetach, this), 30.f); -} - -void LLVOAvatarSelf::checkPendingDetach() -{ - if (gTeleportDisplay) - return; - - for (const LLUUID& idObj : mPendingObjectDetach) - { - LLViewerObject* pObject = gObjectList.findObject(idObj); - if (pObject) - { - gObjectList.killObject(pObject); - if (gShowObjectUpdates) - { - LLColor4 color(0.f, 1.f, 0.f, 1.f); - gPipeline.addDebugBlip(pObject->getPositionAgent(), color); - } - LLSelectMgr::getInstance()->removeObjectFromSelections(idObj); - } - } - mPendingObjectDetach.clear(); -} -// [/SL:KB] +//// [SL:KB] - Patch: Appearance-TeleportAttachKill | Checked: Catznip-4.0 +//void LLVOAvatarSelf::addPendingDetach(const LLUUID& idObject) +//{ +// if (mPendingObjectDetach.end() == std::find(mPendingObjectDetach.begin(), mPendingObjectDetach.end(), idObject)) +// mPendingObjectDetach.push_back(idObject); +// +// if ((!mPendingObjectDetach.empty()) && (!mTeleportDoneConn.connected())) +// mTeleportDoneConn = LLViewerParcelMgr::instance().setTeleportDoneCallback(boost::bind(&LLVOAvatarSelf::onTeleportDone, this)); +//} +// +//bool LLVOAvatarSelf::isPendingDetach(const LLUUID& idObject) const +//{ +// return mPendingObjectDetach.end() != std::find(mPendingObjectDetach.begin(), mPendingObjectDetach.end(), idObject); +//} +// +//void LLVOAvatarSelf::removePendingDetach(const LLUUID& idObject) +//{ +// auto itPendingDetach = std::find(mPendingObjectDetach.begin(), mPendingObjectDetach.end(), idObject); +// if (mPendingObjectDetach.end() != itPendingDetach) +// mPendingObjectDetach.erase(itPendingDetach); +// +// if (mPendingObjectDetach.empty()) +// mTeleportDoneConn.disconnect(); +//} +// +//void LLVOAvatarSelf::onTeleportDone() +//{ +// mTeleportDoneConn.disconnect(); +// doAfterInterval(boost::bind(&LLVOAvatarSelf::checkPendingDetach, this), 30.f); +//} +// +//void LLVOAvatarSelf::checkPendingDetach() +//{ +// if (gTeleportDisplay) +// return; +// +// for (const LLUUID& idObj : mPendingObjectDetach) +// { +// LLViewerObject* pObject = gObjectList.findObject(idObj); +// if (pObject) +// { +// gObjectList.killObject(pObject); +// if (gShowObjectUpdates) +// { +// LLColor4 color(0.f, 1.f, 0.f, 1.f); +// gPipeline.addDebugBlip(pObject->getPositionAgent(), color); +// } +// LLSelectMgr::getInstance()->removeObjectFromSelections(idObj); +// } +// } +// mPendingObjectDetach.clear(); +//} +//// [/SL:KB] diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index ad80dedb978..fc2209246f5 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -408,15 +408,15 @@ class LLVOAvatarSelf : void debugTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); // [SL:KB] - Patch: Appearance-TeleportAttachKill | Checked: Catznip-4.0 -public: - void addPendingDetach(const LLUUID& idObject); - bool isPendingDetach(const LLUUID& idObject) const; - void removePendingDetach(const LLUUID& idObject); - void checkPendingDetach(); - void onTeleportDone(); -protected: - std::list<LLUUID> mPendingObjectDetach; - boost::signals2::connection mTeleportDoneConn; +//public: +// void addPendingDetach(const LLUUID& idObject); +// bool isPendingDetach(const LLUUID& idObject) const; +// void removePendingDetach(const LLUUID& idObject); +// void checkPendingDetach(); +// void onTeleportDone(); +//protected: +// std::list<LLUUID> mPendingObjectDetach; +// boost::signals2::connection mTeleportDoneConn; // [/SL:KB] void appearanceChangeMetricsCoro(std::string url); -- GitLab