Thu, 11 Dec 2014 19:23:36 +0100
FIRE-15110: RLV @getattach command for "Center 2" attachment point doesn't work:
* Need to omit the legacy attachment point name instead of the current bridge attachment point (Center 2)
* Omit bridge attachment when calling @getattach
indra/newview/fslslbridge.h | file | annotate | diff | revisions | |
indra/newview/rlvhandler.cpp | file | annotate | diff | revisions |
1.1 --- a/indra/newview/fslslbridge.h Thu Dec 11 11:05:24 2014 +0100 1.2 +++ b/indra/newview/fslslbridge.h Thu Dec 11 19:23:36 2014 +0100 1.3 @@ -77,6 +77,7 @@ 1.4 void setBridge(LLViewerInventoryItem* item) { mpBridge = item; }; 1.5 LLViewerInventoryItem* getBridge() { return mpBridge; }; 1.6 bool canUseBridge(); 1.7 + bool isBridgeValid() const { return NULL != mpBridge; } 1.8 1.9 void checkBridgeScriptName(const std::string& fileName); 1.10 std::string currentFullName() { return mCurrentFullName; } 1.11 @@ -106,7 +107,6 @@ 1.12 LLUUID mBridgeUUID; 1.13 1.14 bool mIsFirstCallDone; //initialization conversation 1.15 - bool isBridgeValid() const { return NULL != mpBridge; } 1.16 1.17 uuid_vec_t mAllowedDetachables; 1.18
2.1 --- a/indra/newview/rlvhandler.cpp Thu Dec 11 11:05:24 2014 +0100 2.2 +++ b/indra/newview/rlvhandler.cpp Thu Dec 11 19:23:36 2014 +0100 2.3 @@ -2033,14 +2033,16 @@ 2.4 { 2.5 const LLViewerJointAttachment* pAttachPt = itAttach->second; 2.6 //<FS:TS> FIRE-11848 @getattach includes the LSL bridge 2.7 - if (pAttachPt->getName() == FS_BRIDGE_ATTACHMENT_POINT_NAME) 2.8 + if (pAttachPt->getName() == "Bridge") 2.9 { 2.10 continue; 2.11 } 2.12 //</FS:TS> FIRE-11848 2.13 if ( (0 == idxAttachPt) || (itAttach->first == idxAttachPt) ) 2.14 { 2.15 - bool fWorn = (pAttachPt->getNumObjects() > 0) && 2.16 + // Ansa: Do not include the bridge when checking for number of objects 2.17 + S32 bridge_correct = (pAttachPt->getName() == FS_BRIDGE_ATTACHMENT_POINT_NAME && FSLSLBridge::instance().isBridgeValid()) ? 1 : 0; 2.18 + bool fWorn = ((pAttachPt->getNumObjects() - bridge_correct) > 0) && 2.19 ( (!RlvSettings::getHideLockedAttach()) || (RlvForceWear::isForceDetachable(pAttachPt, true, rlvCmd.getObjectID())) ); 2.20 strReply.push_back( (fWorn) ? '1' : '0' ); 2.21 } 2.22 @@ -2064,7 +2066,7 @@ 2.23 { 2.24 const LLViewerJointAttachment* pAttachPt = itAttach->second; 2.25 //<FS:TS> FIRE-11848 @getattach includes the LSL bridge 2.26 - if (pAttachPt->getName() == FS_BRIDGE_ATTACHMENT_POINT_NAME) 2.27 + if (pAttachPt->getName() == "Bridge") 2.28 { 2.29 continue; 2.30 } 2.31 @@ -2075,7 +2077,11 @@ 2.32 switch (rlvCmd.getBehaviourType()) 2.33 { 2.34 case RLV_BHVR_GETATTACHNAMES: // Every attachment point that has an attached object 2.35 - fAdd = (pAttachPt->getNumObjects() > 0); 2.36 + // Ansa: Do not include the bridge when checking for number of objects 2.37 + { 2.38 + S32 bridge_correct = ((pAttachPt->getName() == FS_BRIDGE_ATTACHMENT_POINT_NAME && FSLSLBridge::instance().isBridgeValid()) ? 1 : 0); 2.39 + fAdd = ((pAttachPt->getNumObjects() - bridge_correct) > 0); 2.40 + } 2.41 break; 2.42 case RLV_BHVR_GETADDATTACHNAMES: // Every attachment point that can be attached to (wear replace OR wear add) 2.43 fAdd = (gRlvAttachmentLocks.canAttach(pAttachPt) & RLV_WEAR);