summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorleviathan <leviathan@lindenlab.com>2026-07-23 15:23:41 -0700
committerleviathan <leviathan@lindenlab.com>2026-10-16 13:14:36 -0700
commit73eebef69653ad2fbf804924988f4cf40fca18d2 (patch)
treef94afaed0b379250aaf91c507b47f5307a796b89 /indra/newview/llagent.cpp
parent876d8fd2137f22755dcd3a9f9f6d7b2034c16d57 (diff)
add mouselook action mode to game-control
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r--indra/newview/llagent.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 881ce538f4..cea67fb61f 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -5002,14 +5002,20 @@ static S32 g_deltaFrame { 0 };
void LLAgent::updateGameControlMode()
{
- // Auto-derive the active mode from avatar state. Flycam takes precedence
- // (it is toggled via a game-control binding), then sitting/controls-taken
- // maps to Captive, otherwise the normal Avatar mode.
+ // Auto-derive the active mode from avatar/camera state. Flycam takes
+ // precedence (it is toggled via a game-control binding), then mouselook
+ // (the camera mode can be entered while sitting too, so it is checked
+ // ahead of Captive), then sitting/controls-taken maps to Captive,
+ // otherwise the normal Avatar mode.
LLGameControl::AgentControlMode mode;
if (mUsingFlycam)
{
mode = LLGameControl::CONTROL_MODE_FLYCAM;
}
+ else if (gAgentCamera.cameraMouselook())
+ {
+ mode = LLGameControl::CONTROL_MODE_MOUSELOOK;
+ }
else if (isSitting())
{
mode = LLGameControl::CONTROL_MODE_CAPTIVE;