summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorHadet <hadet@Mac.lan>2026-05-28 21:27:52 -0500
committerHadet <hadet@Mac.lan>2026-05-29 18:03:54 -0500
commit4c6584d1ecc57e8a34e078935b03851b59d4f9eb (patch)
tree5c8a3edc3a5ae79c93a0d35becdc510606cfdec1 /indra/newview/llagent.cpp
parent184cd85f01b7654e8dd3e476b2c268849d97ee78 (diff)
add Over-The-Shoulder mouse look alternative
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r--indra/newview/llagent.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 23647487b0..75a9ef58fc 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -2123,6 +2123,13 @@ std::ostream& operator<<(std::ostream &s, const LLAgent &agent)
//-----------------------------------------------------------------------------
bool LLAgent::needsRenderAvatar()
{
+ // OTS mode: always render avatar — we are in third-person even though
+ // mouselook input is active.
+ if (gAgentCamera.cameraOTS())
+ {
+ return mShowAvatar && mOutfitChosen;
+ }
+
if (gAgentCamera.cameraMouselook() && !LLVOAvatar::sVisibleInFirstPerson)
{
return false;
@@ -2134,6 +2141,11 @@ bool LLAgent::needsRenderAvatar()
// true if we need to render your own avatar's head.
bool LLAgent::needsRenderHead()
{
+ // OTS mode: always render head — avatar is fully visible.
+ if (gAgentCamera.cameraOTS())
+ {
+ return mShowAvatar;
+ }
return (LLVOAvatar::sVisibleInFirstPerson && LLPipeline::sReflectionRender) || (mShowAvatar && !gAgentCamera.cameraMouselook());
}
@@ -2247,7 +2259,8 @@ void LLAgent::endAnimationUpdateUI()
}
// clean up UI from mode we're leaving
- if (gAgentCamera.getLastCameraMode() == CAMERA_MODE_MOUSELOOK )
+ if (gAgentCamera.getLastCameraMode() == CAMERA_MODE_MOUSELOOK
+ || gAgentCamera.getLastCameraMode() == CAMERA_MODE_OTS)
{
gToolBarView->setToolBarsVisible(true);
// show mouse cursor
@@ -2369,7 +2382,8 @@ void LLAgent::endAnimationUpdateUI()
//---------------------------------------------------------------------
// Set up UI for mode we're entering
//---------------------------------------------------------------------
- if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK)
+ if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK
+ || gAgentCamera.getCameraMode() == CAMERA_MODE_OTS)
{
// clean up UI
// first show anything hidden by UI toggle