From 9b83573b4083327a5a447dfe754428898c0c17c7 Mon Sep 17 00:00:00 2001 From: Hecklezz Date: Wed, 13 Aug 2025 07:03:26 +1000 Subject: [PATCH] Revert "Fix: ignore *pass-on* counters when detecting left-button grabs (#3990)" This reverts commit 65d70a8d8f211b462481e93f919a100c8b3b2af5. Reason can be found here- https://github.com/secondlife/viewer/issues/4535 --- indra/newview/llagent.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index fc7022b017..27cfa420cc 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -4140,14 +4140,11 @@ void LLAgent::initOriginGlobal(const LLVector3d &origin_global) bool LLAgent::leftButtonGrabbed() const { - if (gAgentCamera.cameraMouselook()) - { - return mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0; - } - else - { - return mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0; - } + const bool camera_mouse_look = gAgentCamera.cameraMouselook(); + return (!camera_mouse_look && mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0) + || (camera_mouse_look && mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0) + || (!camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_LBUTTON_DOWN_INDEX] > 0) + || (camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0); } bool LLAgent::rotateGrabbed() const