Attempt to fix Issue 929: [Regression] Automatic Bridge Detach does not work

This commit is contained in:
Lirusaito
2013-07-19 19:54:11 -04:00
parent b4d33fe0e1
commit b2522a06b4
2 changed files with 5 additions and 6 deletions

View File

@@ -6208,6 +6208,11 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi
if (!attachment)
{
llwarns << "Object attachment point invalid: " << attachmentID << llendl;
if (isSelf() && attachmentID == 127 && gSavedSettings.getBOOL("SGDetachBridge"))
{
llinfos << "Bridge detected! detaching" << llendl;
return 0;
}
// attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest)
// [SL:KB] - Patch: Appearance-LegacyMultiAttachment | Checked: 2010-08-28 (Catznip-2.2.0a) | Added: Catznip2.1.2a
S32 idxAttachPt = 1;

View File

@@ -1201,12 +1201,6 @@ const LLViewerJointAttachment *LLVOAvatarSelf::attachObject(LLViewerObject *view
gRlvAttachmentLocks.updateLockedHUD();
}
// [/RLVa:KB]
bool detach_bridge = gSavedSettings.getBOOL("SGDetachBridge");
if (detach_bridge && RlvAttachPtLookup::getAttachPointIndex(viewer_object) == 127)
{
llinfos << "Bridge detected! detaching" << llendl;
LLAppearanceMgr::getInstance()->removeItemFromAvatar(attachment_id);
}
}