From 5baea92f3e67c10e95b64422366188c23bb5c210 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 17 Aug 2025 00:31:50 +0200 Subject: [PATCH] Add option to automatically reset skeleton upon standing up and broadcast reset to surrounding avatars as well (possible starting with LL release 2025.06) --- indra/newview/app_settings/settings.xml | 11 ++++++++++ indra/newview/llvoavatar.cpp | 21 ++++++++++++++----- .../xui/de/panel_preferences_firestorm.xml | 1 + .../xui/en/panel_preferences_firestorm.xml | 9 ++++++++ 4 files changed, 37 insertions(+), 5 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index abc426f822..29f430cbc0 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -26927,5 +26927,16 @@ Change of this parameter will affect the layout of buttons in notification toast 0 + FSResetSkeletonOnStandUp + + Comment + Resets own avatar skeleton upon standing up and sends the reset to all surrounding avatars + Persist + 1 + Type + Boolean + Value + 0 + diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 7d1d4bda71..06afdd0ae6 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -122,20 +122,21 @@ #include +#include "fsavatarrenderpersistence.h" #include "fscommon.h" #include "fsdata.h" +#include "fsdiscordconnect.h" // tapping a place that happens on landing in world to start up discord +#include "fslslbridge.h" // Movelock position refresh #include "lfsimfeaturehandler.h" // Opensim #include "lggcontactsets.h" #include "llcontrol.h" #include "llfilepicker.h" // FIRE-8893 - Dump archetype xml to user defined location -#include "llviewermenufile.h" +#include "llhudeffectresetskeleton.h" #include "llnetmap.h" -#include "llviewernetwork.h" // [FS:CR] isInSecondlife() #include "llsidepanelappearance.h" -#include "fsavatarrenderpersistence.h" -#include "fslslbridge.h" // Movelock position refresh +#include "llviewermenufile.h" +#include "llviewernetwork.h" // [FS:CR] isInSecondlife() -#include "fsdiscordconnect.h" // tapping a place that happens on landing in world to start up discord extern F32 SPEED_ADJUST_MAX; extern F32 SPEED_ADJUST_MAX_SEC; @@ -9140,6 +9141,16 @@ void LLVOAvatar::getOffObject() { revokePermissionsOnObject(sit_object); } + + // Reset skeleton on stand up option + if (gSavedSettings.getBOOL("FSResetSkeletonOnStandUp")) + { + LLHUDEffectResetSkeleton* effectp = (LLHUDEffectResetSkeleton*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_RESET_SKELETON, true); + effectp->setSourceObject(gAgentAvatarp); + effectp->setTargetObject(gAgentAvatarp); + effectp->setResetAnimations(false); + } + // } } diff --git a/indra/newview/skins/default/xui/de/panel_preferences_firestorm.xml b/indra/newview/skins/default/xui/de/panel_preferences_firestorm.xml index e8aa7b83ba..f044aa769f 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_firestorm.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_firestorm.xml @@ -26,6 +26,7 @@ + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml b/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml index dfcbae7fa0..be62ea77e3 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml @@ -102,6 +102,15 @@ tool_tip="If enabled, the viewer will run a default, priority 0 bento animation that poses hands, wings, mouth and tail in a natural position when no other bento animation is running." width="270" control_name="FSPlayDefaultBentoAnimation"/> +