From a0ec1334e0bc8c166114ae6cc8cf105eb64dcbd6 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 12 Aug 2026 18:35:14 +0800 Subject: Option to disable the pre-jump & land animations https://megapahit.com/show_bug.cgi?id=21 Returning false is for disabling, setting AGENT_CONTROL_FINISH_ANIM is to not get stuck. --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llvoavatar.cpp | 11 ++++++++++- .../skins/default/xui/en/panel_preferences_move.xml | 16 ++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c6b7d8eddb..47506d9cb2 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2774,6 +2774,17 @@ Value 0 + DisablePreJumpLand + + Comment + Disable pre-jump and jump animations + Persist + 1 + Type + Boolean + Value + 0 + BlockTeleportOffers Comment diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 16f2064d1b..f0fa1d782e 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6374,6 +6374,7 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id) // virtual bool LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) { + static LLCachedControl disable_pre_jump_land(gSavedSettings, "DisablePreJumpLand"); LL_DEBUGS("Motion") << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL; LLUUID remap_id = remapMotionID(id); @@ -6383,9 +6384,17 @@ bool LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) LL_DEBUGS("Motion") << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << LL_ENDL; } - if (isSelf() && remap_id == ANIM_AGENT_AWAY) + if (isSelf()) { + if (remap_id == ANIM_AGENT_AWAY) + { gAgent.setAFK(); + } + else if (disable_pre_jump_land && (remap_id == ANIM_AGENT_PRE_JUMP || remap_id == ANIM_AGENT_LAND || remap_id == ANIM_AGENT_MEDIUM_LAND)) + { + gAgent.setControlFlags(AGENT_CONTROL_FINISH_ANIM); + return false; + } } return LLCharacter::startMotion(remap_id, time_offset); diff --git a/indra/newview/skins/default/xui/en/panel_preferences_move.xml b/indra/newview/skins/default/xui/en/panel_preferences_move.xml index f26958c8bd..a0489b37b5 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_move.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_move.xml @@ -360,6 +360,22 @@ width="200" /> + + + +