diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-08-15 06:14:30 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-08-15 06:14:30 +0800 |
commit | 1b208964506c31da88353e058bba83813c468756 (patch) | |
tree | 89547add1b4a4a8c78afa50b72d35d6e818f8a33 /indra/newview/llagent.cpp | |
parent | 6826fd3eb2607b334017f1312e7cac945cae2907 (diff) | |
parent | 922d2324d06326602fdf5770bc555e3e9f90e74b (diff) |
Merge tag 'Second_Life_Release#922d2324-2025.06' into 2025.06
Diffstat (limited to 'indra/newview/llagent.cpp')
-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 e12616098c..1cd58b7101 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3444,14 +3444,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 |