From 821000f47e07cdc180e2f47ca5638ae58fd9b666 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 27 Oct 2020 19:13:46 +0100 Subject: [PATCH] FIRE-1765: Allow double-click walk/teleport action to scripted objects (as recently seen in Phoenix...) --- indra/newview/app_settings/settings.xml | 15 +++++++++++++-- indra/newview/lltoolpie.cpp | 13 +++++++++++-- .../default/xui/de/panel_preferences_move.xml | 1 + .../default/xui/en/panel_preferences_move.xml | 10 ++++++++++ 4 files changed, 35 insertions(+), 4 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 323734281e..b6c8483d04 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -25283,7 +25283,7 @@ Change of this parameter will affect the layout of buttons in notification toast Type S32 Value - 10 + 15 FSDynamicTextureMemoryGPUReserve @@ -25294,7 +25294,7 @@ Change of this parameter will affect the layout of buttons in notification toast Type S32 Value - 10 + 15 FSDynamicTextureMemoryMinTextureMemory @@ -25307,5 +25307,16 @@ Change of this parameter will affect the layout of buttons in notification toast Value 512 + FSAllowDoubleClickOnScriptedObjects + + Comment + If enabled, allows double-click movement action (walk/teleport) to scripted objects + Persist + 1 + Type + Boolean + Value + 1 + diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index e17843930d..21ba829ac0 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -947,8 +947,14 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) { return TRUE; } + + // FIRE-1765: Allow double-click walk/teleport to scripted objects + bool allowDoubleClickOnScriptedObjects = gSavedSettings.getBOOL("FSAllowDoubleClickOnScriptedObjects"); - if (!mDoubleClickTimer.getStarted() || (mDoubleClickTimer.getElapsedTimeF32() > 0.3f)) + // FIRE-1765: Allow double-click walk/teleport to scripted objects + //if (!mDoubleClickTimer.getStarted() || (mDoubleClickTimer.getElapsedTimeF32() > 0.3f)) + if (!allowDoubleClickOnScriptedObjects && (!mDoubleClickTimer.getStarted() || (mDoubleClickTimer.getElapsedTimeF32() > 0.3f))) + // { mDoubleClickTimer.stop(); return FALSE; @@ -1011,7 +1017,10 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) bool has_touch_handler = (objp && objp->flagHandleTouch()) || (parentp && parentp->flagHandleTouch()); bool has_click_action = final_click_action(objp); - if (pos_non_zero && (is_land || (is_in_world && !has_touch_handler && !has_click_action))) + // FIRE-1765: Allow double-click walk/teleport to scripted objects + //if (pos_non_zero && (is_land || (is_in_world && !has_touch_handler && !has_click_action))) + if (pos_non_zero && (is_land || (is_in_world && ((allowDoubleClickOnScriptedObjects && objp->getClickAction() != CLICK_ACTION_SIT) || (!has_touch_handler && !has_click_action))))) + // { LLVector3d pos = mPick.mPosGlobal; pos.mdV[VZ] += gAgentAvatarp->getPelvisToFoot(); diff --git a/indra/newview/skins/default/xui/de/panel_preferences_move.xml b/indra/newview/skins/default/xui/de/panel_preferences_move.xml index 1dbf2a7999..63b0d416d7 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_move.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_move.xml @@ -85,6 +85,7 @@ +