From e8dc5e27ce00ad911bf04b4aef4bbcf6190930b9 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 3 Aug 2021 20:18:30 +0300 Subject: SL-15746 Turning right has priority over turning left Does not cover other opposite-direction movements since only rotation is viewer handled. --- indra/newview/llagent.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 389448654a..41578f2328 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -713,6 +713,12 @@ void LLAgent::moveYaw(F32 mag, bool reset_view) setControlFlags(AGENT_CONTROL_YAW_NEG); } + U32 mask = AGENT_CONTROL_YAW_POS | AGENT_CONTROL_YAW_NEG; + if ((getControlFlags() & mask) == mask) + { + gAgentCamera.setYawKey(0); + } + if (reset_view) { gAgentCamera.resetView(); -- cgit v1.2.3 From 4043945dc778147738da0e6ee6d404ef7075a6da Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 13 Aug 2021 19:21:01 +0300 Subject: SL-15689 EEP doesn't change with height for sitting agents --- indra/newview/llagent.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 41578f2328..4ef9c10de2 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2010,6 +2010,27 @@ void LLAgent::updateAgentPosition(const F32 dt, const F32 yaw_radians, const S32 // gAgentCamera.updateLookAt(mouse_x, mouse_y); + + // When agent has no parents, position updates come from setPositionAgent() + // But when agent has a parent (ex: is seated), position remains unchanged + // relative to parent and no parent's position update trigger + // setPositionAgent(). + // But EEP's sky track selection still needs an update if agent has a parent + // and parent moves (ex: vehicles). + if (isAgentAvatarValid() + && gAgentAvatarp->getParent() + && !mOnPositionChanged.empty() + ) + { + LLVector3d new_position = getPositionGlobal(); + if ((mLastTestGlobal - new_position).lengthSquared() > 1.0) + { + // If the position has changed by more than 1 meter since the last time we triggered. + // filters out some noise. + mLastTestGlobal = new_position; + mOnPositionChanged(mFrameAgent.getOrigin(), new_position); + } + } } // friends and operators -- cgit v1.2.3