diff options
author | Jacek Antonelli | 2008-08-15 23:45:44 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:44 -0500 |
commit | acfdcf2b1deeb04698174c78e8cb22b093445bb1 (patch) | |
tree | 811293650bcf81d01ea7c54d7c2cf263110aa329 /linden/indra/newview/llviewerkeyboard.cpp | |
parent | Second Life viewer sources 1.20.2 (diff) | |
download | meta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.zip meta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.tar.gz meta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.tar.bz2 meta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.tar.xz |
Second Life viewer sources 1.20.3
Diffstat (limited to 'linden/indra/newview/llviewerkeyboard.cpp')
-rw-r--r-- | linden/indra/newview/llviewerkeyboard.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/linden/indra/newview/llviewerkeyboard.cpp b/linden/indra/newview/llviewerkeyboard.cpp index 1c5d870..0d927ae 100644 --- a/linden/indra/newview/llviewerkeyboard.cpp +++ b/linden/indra/newview/llviewerkeyboard.cpp | |||
@@ -88,8 +88,6 @@ static void agent_handle_doubletap_run(EKeystate s, LLAgent::EDoubleTapRunMode m | |||
88 | { | 88 | { |
89 | if (KEYSTATE_UP == s) | 89 | if (KEYSTATE_UP == s) |
90 | { | 90 | { |
91 | // Releasing a walk-key resets the double-tap timer | ||
92 | gAgent.mDoubleTapRunTimer.reset(); | ||
93 | if (gAgent.mDoubleTapRunMode == mode && | 91 | if (gAgent.mDoubleTapRunMode == mode && |
94 | gAgent.getRunning() && | 92 | gAgent.getRunning() && |
95 | !gAgent.getAlwaysRun()) | 93 | !gAgent.getAlwaysRun()) |
@@ -98,17 +96,23 @@ static void agent_handle_doubletap_run(EKeystate s, LLAgent::EDoubleTapRunMode m | |||
98 | gAgent.clearRunning(); | 96 | gAgent.clearRunning(); |
99 | gAgent.sendWalkRun(gAgent.getRunning()); | 97 | gAgent.sendWalkRun(gAgent.getRunning()); |
100 | } | 98 | } |
101 | gAgent.mDoubleTapRunMode = mode; | ||
102 | } | 99 | } |
103 | else if (gAllowTapTapHoldRun && | 100 | else if (gAllowTapTapHoldRun && |
104 | KEYSTATE_DOWN == s && | 101 | KEYSTATE_DOWN == s && |
105 | gAgent.mDoubleTapRunMode == mode && | 102 | !gAgent.getRunning()) |
106 | gAgent.mDoubleTapRunTimer.getElapsedTimeF32() < NUDGE_TIME) | ||
107 | { | 103 | { |
108 | // Same walk-key was pushed again quickly; this is a double-tap | 104 | if (gAgent.mDoubleTapRunMode == mode && |
109 | // so engage temporary running. | 105 | gAgent.mDoubleTapRunTimer.getElapsedTimeF32() < NUDGE_TIME) |
110 | gAgent.setRunning(); | 106 | { |
111 | gAgent.sendWalkRun(gAgent.getRunning()); | 107 | // Same walk-key was pushed again quickly; this is a |
108 | // double-tap so engage temporary running. | ||
109 | gAgent.setRunning(); | ||
110 | gAgent.sendWalkRun(gAgent.getRunning()); | ||
111 | } | ||
112 | |||
113 | // Pressing any walk-key resets the double-tap timer | ||
114 | gAgent.mDoubleTapRunTimer.reset(); | ||
115 | gAgent.mDoubleTapRunMode = mode; | ||
112 | } | 116 | } |
113 | } | 117 | } |
114 | 118 | ||