diff options
| author | Trish <sl.trish.ace@gmail.com> | 2026-02-11 10:16:58 -0500 |
|---|---|---|
| committer | Trish <sl.trish.ace@gmail.com> | 2026-02-11 10:16:58 -0500 |
| commit | 2cabd41943c8d14bc72b52f1891671b28d0a856a (patch) | |
| tree | 89c2cde9e9c4ea623edff73a361665eee797bedb /indra/newview | |
| parent | 7e9cc1a55a89650066aa2081d2d895d1b10a0b5b (diff) | |
fix - copilot suggestions
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llagent.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 71883c8f42..c559c0641a 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -115,6 +115,7 @@ const F32 AUTOPILOT_MAX_TIME_NO_PROGRESS_FLY = 2.5f; // seconds. Flying i const F32 MAX_VELOCITY_AUTO_LAND_SQUARED = 4.f * 4.f; const F64 CHAT_AGE_FAST_RATE = 3.0; +const F64 RECENT_JUMP_THRESHOLD_SECS = 1.0; // seconds // fidget constants const F32 MIN_FIDGET_TIME = 8.f; // seconds @@ -425,9 +426,8 @@ LLAgent::LLAgent() : mIsDoNotDisturb(false), - mLastJumpRequestTime(0.0), - mControlFlags(0x00000000), + mLastJumpRequestTime(0.0), mAutoPilot(false), mAutoPilotFlyOnStop(false), @@ -679,10 +679,6 @@ void LLAgent::moveAt(S32 direction, bool reset) if (direction > 0) { - if (!getFlying()) - { - mLastJumpRequestTime = LLTimer::getTotalSeconds(); - } setControlFlags(AGENT_CONTROL_AT_POS | AGENT_CONTROL_FAST_AT); } else if (direction < 0) @@ -786,6 +782,10 @@ void LLAgent::moveUp(S32 direction) if (direction > 0) { + if (!getFlying()) + { + mLastJumpRequestTime = LLTimer::getTotalSeconds(); + } setControlFlags(AGENT_CONTROL_UP_POS | AGENT_CONTROL_FAST_UP); } else if (direction < 0) @@ -2676,7 +2676,7 @@ void LLAgent::onAnimStop(const LLUUID& id) const bool up_pos = (mControlFlags & AGENT_CONTROL_UP_POS) != 0; const F64 now = LLTimer::getTotalSeconds(); const F64 elapsed = now - mLastJumpRequestTime; - const bool recent_jump = (mLastJumpRequestTime > 0.0) && (elapsed < 1.0); + const bool recent_jump = (mLastJumpRequestTime > 0.0) && (elapsed < RECENT_JUMP_THRESHOLD_SECS); if (!up_pos && !recent_jump) { |
