diff options
author | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-08-12 20:35:48 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-08-12 20:38:09 +0300 |
commit | 9c6fd95bdb2bfd99a01c2f2a0dadcf14d3febac0 (patch) | |
tree | d204f482b1db1844d80dfd84115c69aa725b5aad /indra/newview | |
parent | e3d15a9146d375368066cdbcf2a45f40165175f1 (diff) |
Revert "Fix: ignore *pass-on* counters when detecting left-button grabs (#3990)"
This reverts commit 65d70a8d8f211b462481e93f919a100c8b3b2af5.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llagent.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 039bd4da2a..2161dbe19e 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3469,14 +3469,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 |