diff options
| author | leviathan <leviathan@lindenlab.com> | 2026-09-03 19:11:25 -0700 |
|---|---|---|
| committer | leviathan <leviathan@lindenlab.com> | 2026-10-16 13:14:37 -0700 |
| commit | 413009578e98dbd2f92cd3802aa77d4475cc1d5f (patch) | |
| tree | 37f3b51ed03c60c99ffcd39f4e27770e6b3f2b71 /indra/newview/llagent.cpp | |
| parent | f88bb46b3fc16c25c9cc375c1737ed2f06bf3489 (diff) | |
allow cursor mode on top of flycam
Diffstat (limited to 'indra/newview/llagent.cpp')
| -rw-r--r-- | indra/newview/llagent.cpp | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index cb521cc3db..d36df00031 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -5002,20 +5002,29 @@ static S32 g_deltaFrame { 0 }; void LLAgent::updateGameControlMode() { - // Auto-derive the active mode from avatar/camera state. Flycam takes - // precedence (it is toggled via a game-control binding), then Cursor - // mode (also an explicit toggle -- see mUsingMouseCursor/toggleMouseCursorMode()), - // then mouselook (the camera mode can be entered while sitting too, so it is + // Auto-derive the active mode from avatar/camera state. Cursor mode takes + // precedence over Flycam: toggling the mouse cursor on while Flycam is engaged + // reports CONTROL_MODE_CURSOR (so the left stick drives the on-screen cursor) + // while mUsingFlycam stays true underneath -- LLAgent::updateFlycam() keeps + // driving the camera every frame regardless of the reported mode (it is gated + // on mUsingFlycam directly, not on AgentControlMode), and + // LLGameControl::setFlycamEngaged() below tells the input-mapping lookup to + // let Flycam's own axis/button config (Pan/Tilt/Boom/...) keep driving + // whatever physical inputs Cursor mode's own mouse-cursor actions don't claim. + // This is how a single Cursor mode ends up with two flavors -- "other axes" + // control the avatar/camera depending on whether Flycam is concurrently + // engaged -- without needing a distinct mode of its own. + // Next: 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) + if (mUsingMouseCursor) { - mode = LLGameControl::CONTROL_MODE_FLYCAM; + mode = LLGameControl::CONTROL_MODE_CURSOR; } - else if (mUsingMouseCursor) + else if (mUsingFlycam) { - mode = LLGameControl::CONTROL_MODE_CURSOR; + mode = LLGameControl::CONTROL_MODE_FLYCAM; } else if (gAgentCamera.cameraMouselook()) { @@ -5029,6 +5038,7 @@ void LLAgent::updateGameControlMode() { mode = LLGameControl::CONTROL_MODE_AVATAR; } + LLGameControl::setFlycamEngaged(mUsingFlycam); LLGameControl::setAgentControlMode(mode); } |
