summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2026-02-25 13:45:30 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2026-02-25 13:45:30 +0200
commite9c4c1aacffa9eb45628f6356152a70e5a61a32b (patch)
tree5bd58156971c04c6106679f0d5a4368005cdff69 /indra/newview/llagent.cpp
parentaa4ad2e95da5207a1250ca5fd23f7f0e6528a44e (diff)
parent3529bc5f9d29a71355f3a3666540abff57dc1a4c (diff)
Merge branch 'release/2026.02' into maxim/flat-ui-fonts-update
# Conflicts: # indra/newview/skins/default/xui/en/panel_preferences_general.xml
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r--indra/newview/llagent.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 0d7ad0a124..3ab87cac13 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -426,6 +426,7 @@ LLAgent::LLAgent() :
mIsDoNotDisturb(false),
mControlFlags(0x00000000),
+ mLastJumpInputTime(0.0),
mAutoPilot(false),
mAutoPilotFlyOnStop(false),
@@ -780,6 +781,10 @@ void LLAgent::moveUp(S32 direction)
if (direction > 0)
{
+ if (!getFlying())
+ {
+ mLastJumpInputTime = LLTimer::getTotalSeconds();
+ }
setControlFlags(AGENT_CONTROL_UP_POS | AGENT_CONTROL_FAST_UP);
}
else if (direction < 0)
@@ -2663,7 +2668,21 @@ void LLAgent::onAnimStop(const LLUUID& id)
}
else if (id == ANIM_AGENT_PRE_JUMP || id == ANIM_AGENT_LAND || id == ANIM_AGENT_MEDIUM_LAND)
{
- setControlFlags(AGENT_CONTROL_FINISH_ANIM);
+ // FIRE-34049/FIRE-34273/https://github.com/secondlife/viewer/issues/4218
+ // Avoid forcing AGENT_CONTROL_FINISH_ANIM, which can short-circuit the next pre-jump
+ // during rapid successive jumps.
+ // TODO: a more robust fix would require knowing which specific animation finished,
+ // information that is not currently provided by the simulator.
+ const bool up_pos = (mControlFlags & AGENT_CONTROL_UP_POS) != 0;
+ const F64 now = LLTimer::getTotalSeconds();
+ const F64 elapsed = now - mLastJumpInputTime;
+ static LLCachedControl<F32> recent_jump_threshold_secs(gSavedSettings, "RecentJumpThresholdSecs");
+ const bool recent_jump = (mLastJumpInputTime > 0.0) && (elapsed < recent_jump_threshold_secs);
+
+ if (!up_pos && !recent_jump)
+ {
+ setControlFlags(AGENT_CONTROL_FINISH_ANIM);
+ }
}
}
@@ -4850,6 +4869,8 @@ const std::string& LLAgent::getTeleportStateName() const
void LLAgent::parseTeleportMessages(const std::string& xml_filename)
{
+ LL_PROFILE_ZONE_SCOPED;
+
LLXMLNodePtr root;
bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root);