From b2522a06b4927c8e9b1c2aa9dd79223e5988b1ff Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Fri, 19 Jul 2013 19:54:11 -0400 Subject: [PATCH] Attempt to fix Issue 929: [Regression] Automatic Bridge Detach does not work --- indra/newview/llvoavatar.cpp | 5 +++++ indra/newview/llvoavatarself.cpp | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 7f210359d..5fce8e843 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -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; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index fc53d4091..63ac07e0d 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -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); - } }