diff --git a/indra/newview/fslslbridge.h b/indra/newview/fslslbridge.h index f555722d75..8b21f40c8f 100644 --- a/indra/newview/fslslbridge.h +++ b/indra/newview/fslslbridge.h @@ -77,6 +77,7 @@ public: void setBridge(LLViewerInventoryItem* item) { mpBridge = item; }; LLViewerInventoryItem* getBridge() { return mpBridge; }; bool canUseBridge(); + bool isBridgeValid() const { return NULL != mpBridge; } void checkBridgeScriptName(const std::string& fileName); std::string currentFullName() { return mCurrentFullName; } @@ -106,7 +107,6 @@ private: LLUUID mBridgeUUID; bool mIsFirstCallDone; //initialization conversation - bool isBridgeValid() const { return NULL != mpBridge; } uuid_vec_t mAllowedDetachables; diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index dbc908fbd3..0f1b06becd 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -2033,14 +2033,16 @@ ERlvCmdRet RlvHandler::onGetAttach(const RlvCommand& rlvCmd, std::string& strRep { const LLViewerJointAttachment* pAttachPt = itAttach->second; // FIRE-11848 @getattach includes the LSL bridge - if (pAttachPt->getName() == FS_BRIDGE_ATTACHMENT_POINT_NAME) + if (pAttachPt->getName() == "Bridge") { continue; } // FIRE-11848 if ( (0 == idxAttachPt) || (itAttach->first == idxAttachPt) ) { - bool fWorn = (pAttachPt->getNumObjects() > 0) && + // Ansa: Do not include the bridge when checking for number of objects + S32 bridge_correct = (pAttachPt->getName() == FS_BRIDGE_ATTACHMENT_POINT_NAME && FSLSLBridge::instance().isBridgeValid()) ? 1 : 0; + bool fWorn = ((pAttachPt->getNumObjects() - bridge_correct) > 0) && ( (!RlvSettings::getHideLockedAttach()) || (RlvForceWear::isForceDetachable(pAttachPt, true, rlvCmd.getObjectID())) ); strReply.push_back( (fWorn) ? '1' : '0' ); } @@ -2064,7 +2066,7 @@ ERlvCmdRet RlvHandler::onGetAttachNames(const RlvCommand& rlvCmd, std::string& s { const LLViewerJointAttachment* pAttachPt = itAttach->second; // FIRE-11848 @getattach includes the LSL bridge - if (pAttachPt->getName() == FS_BRIDGE_ATTACHMENT_POINT_NAME) + if (pAttachPt->getName() == "Bridge") { continue; } @@ -2075,7 +2077,11 @@ ERlvCmdRet RlvHandler::onGetAttachNames(const RlvCommand& rlvCmd, std::string& s switch (rlvCmd.getBehaviourType()) { case RLV_BHVR_GETATTACHNAMES: // Every attachment point that has an attached object - fAdd = (pAttachPt->getNumObjects() > 0); + // Ansa: Do not include the bridge when checking for number of objects + { + S32 bridge_correct = ((pAttachPt->getName() == FS_BRIDGE_ATTACHMENT_POINT_NAME && FSLSLBridge::instance().isBridgeValid()) ? 1 : 0); + fAdd = ((pAttachPt->getNumObjects() - bridge_correct) > 0); + } break; case RLV_BHVR_GETADDATTACHNAMES: // Every attachment point that can be attached to (wear replace OR wear add) fAdd = (gRlvAttachmentLocks.canAttach(pAttachPt) & RLV_WEAR);