SL-15746 Turning right has priority over turning left

Does not cover other opposite-direction movements since only rotation is viewer handled.
meow-7.2.2
Andrey Kleshchev 2021-08-03 20:18:30 +03:00
parent dc1a194507
commit e8dc5e27ce
2 changed files with 13 additions and 0 deletions

View File

@ -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();

View File

@ -3333,6 +3333,13 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
// trigger a control event.
U32 control_flags = gAgent.getControlFlags();
// Rotation into both directions should cancel out
U32 mask = AGENT_CONTROL_YAW_POS | AGENT_CONTROL_YAW_NEG;
if ((control_flags & mask) == mask)
{
control_flags &= ~mask;
}
MASK key_mask = gKeyboard->currentMask(TRUE);
if (key_mask & MASK_ALT || key_mask & MASK_CONTROL)