diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-04-28 23:29:46 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-04-28 23:29:46 +0000 |
commit | 16baf6c9d43fc29e697b5a460439ca664897450c (patch) | |
tree | 6c3ae45c538cbc90408ab72f3a02564cf5dce754 /indra/newview/llviewerkeyboard.cpp | |
parent | 75ee8558abb662b6a0a6b559c61a9549818d2962 (diff) |
merge release-QAR-499 Viewer 1.20 RC 3
merge release-QAR-508 Viewer 1.20 RC 4
merge Branch_1-20-Viewer -r 85278 : 85828 -> release
Diffstat (limited to 'indra/newview/llviewerkeyboard.cpp')
-rw-r--r-- | indra/newview/llviewerkeyboard.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index bea4b910b6..e21c14637b 100644 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -88,8 +88,6 @@ static void agent_handle_doubletap_run(EKeystate s, LLAgent::EDoubleTapRunMode m { if (KEYSTATE_UP == s) { - // Releasing a walk-key resets the double-tap timer - gAgent.mDoubleTapRunTimer.reset(); if (gAgent.mDoubleTapRunMode == mode && gAgent.getRunning() && !gAgent.getAlwaysRun()) @@ -98,17 +96,23 @@ static void agent_handle_doubletap_run(EKeystate s, LLAgent::EDoubleTapRunMode m gAgent.clearRunning(); gAgent.sendWalkRun(gAgent.getRunning()); } - gAgent.mDoubleTapRunMode = mode; } else if (gAllowTapTapHoldRun && KEYSTATE_DOWN == s && - gAgent.mDoubleTapRunMode == mode && - gAgent.mDoubleTapRunTimer.getElapsedTimeF32() < NUDGE_TIME) + !gAgent.getRunning()) { - // Same walk-key was pushed again quickly; this is a double-tap - // so engage temporary running. - gAgent.setRunning(); - gAgent.sendWalkRun(gAgent.getRunning()); + if (gAgent.mDoubleTapRunMode == mode && + gAgent.mDoubleTapRunTimer.getElapsedTimeF32() < NUDGE_TIME) + { + // Same walk-key was pushed again quickly; this is a + // double-tap so engage temporary running. + gAgent.setRunning(); + gAgent.sendWalkRun(gAgent.getRunning()); + } + + // Pressing any walk-key resets the double-tap timer + gAgent.mDoubleTapRunTimer.reset(); + gAgent.mDoubleTapRunMode = mode; } } |