From bdaa5f20a16d14aa172fae04795dfeb97bb4ed75 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Tue, 14 Aug 2012 08:11:15 +0200 Subject: [PATCH] Auto detach Firestorm bridge --- indra/newview/app_settings/settings_ascent_coa.xml | 14 ++++++++++++++ indra/newview/ascentprefssys.cpp | 2 ++ indra/newview/ascentprefssys.h | 1 + indra/newview/llvoavatarself.cpp | 9 ++++++++- .../xui/en-us/panel_preferences_ascent_system.xml | 3 ++- 5 files changed, 27 insertions(+), 2 deletions(-) diff --git a/indra/newview/app_settings/settings_ascent_coa.xml b/indra/newview/app_settings/settings_ascent_coa.xml index b76f74109..792c600e7 100644 --- a/indra/newview/app_settings/settings_ascent_coa.xml +++ b/indra/newview/app_settings/settings_ascent_coa.xml @@ -3,6 +3,20 @@ + SGDetachBridge + + Comment + Force detach phoenix, firestorm, whatever bridge may be there on attachment point 127 + Persist + 1 + Type + Boolean + Value + 1 + IsCOA + 1 + + SGDisableChatAnimation Comment diff --git a/indra/newview/ascentprefssys.cpp b/indra/newview/ascentprefssys.cpp index 684a2fb0a..64f423dec 100644 --- a/indra/newview/ascentprefssys.cpp +++ b/indra/newview/ascentprefssys.cpp @@ -298,6 +298,7 @@ void LLPrefsAscentSys::refreshValues() mPrivateLookAt = gSavedSettings.getBOOL("PrivateLookAt"); mShowLookAt = gSavedSettings.getBOOL("AscentShowLookAt"); mQuietSnapshotsToDisk = gSavedSettings.getBOOL("QuietSnapshotsToDisk"); + mDetachBridge = gSavedSettings.getBOOL("SGDetachBridge"); mRevokePermsOnStandUp = gSavedSettings.getBOOL("RevokePermsOnStandUp"); mDisableClickSit = gSavedSettings.getBOOL("DisableClickSit"); mDisplayScriptJumps = gSavedSettings.getBOOL("AscentDisplayTotalScriptJumps"); @@ -445,6 +446,7 @@ void LLPrefsAscentSys::cancel() gSavedSettings.setBOOL("PrivateLookAt", mPrivateLookAt); gSavedSettings.setBOOL("AscentShowLookAt", mShowLookAt); gSavedSettings.setBOOL("QuietSnapshotsToDisk", mQuietSnapshotsToDisk); + gSavedSettings.setBOOL("SGDetachBridge", mDetachBridge); gSavedSettings.setBOOL("RevokePermsOnStandUp", mRevokePermsOnStandUp); gSavedSettings.setBOOL("DisableClickSit", mDisableClickSit); gSavedSettings.setBOOL("AscentDisplayTotalScriptJumps", mDisplayScriptJumps); diff --git a/indra/newview/ascentprefssys.h b/indra/newview/ascentprefssys.h index deb0b6a3f..3b233bb28 100644 --- a/indra/newview/ascentprefssys.h +++ b/indra/newview/ascentprefssys.h @@ -99,6 +99,7 @@ protected: BOOL mPrivateLookAt; BOOL mShowLookAt; BOOL mQuietSnapshotsToDisk; + BOOL mDetachBridge; BOOL mRevokePermsOnStandUp; BOOL mDisableClickSit; BOOL mDisplayScriptJumps; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index fbf0f63ae..2d8010c70 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1,4 +1,4 @@ -/** +/** * @file llvoavatar.cpp * @brief Implementation of LLVOAvatar class which is a derivation fo LLViewerObject * @@ -1182,6 +1182,13 @@ 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); + } + } return attachment; diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml index e43ab6d30..eec7a9754 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml @@ -83,7 +83,8 @@ - + +