summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2024-01-10 06:40:58 +0100
committerGuru <alexandrgproductengine@lindenlab.com>2024-01-10 15:35:50 +0100
commit44f509a3197b95860da60e5a149bd894df79d828 (patch)
treef684b83a1c8390ab56980ddcc3e224eeea4b8713
parentb489142cb1af0fd469c0a5cedf60040a413f4fbd (diff)
SL-20752 Mouselook no longer allows pitch upwards to full 90 degrees
-rw-r--r--indra/newview/llagent.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 3853aaa8fd..e7234303a8 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -1473,8 +1473,9 @@ void LLAgent::pitch(F32 angle)
// after left-clicking the mouse on the avatar and dragging down
//
// The issue is observed on angle below 10 degrees
+ bool isMouseLookOn = mControlFlags & AGENT_CONTROL_MOUSELOOK;
const F32 look_down_limit = 179.f * DEG_TO_RAD;
- const F32 look_up_limit = 10.f * DEG_TO_RAD;
+ const F32 look_up_limit = (isMouseLookOn ? 1.f : 10.f) * DEG_TO_RAD;
F32 angle_from_skyward = acos(mFrameAgent.getAtAxis() * skyward);