Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion indra/newview/llagent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ LLAgent::LLAgent() :

mIsDoNotDisturb(false),

mLastJumpRequestTime(0.0),

mControlFlags(0x00000000),

Comment thread
trish-sl marked this conversation as resolved.
mAutoPilot(false),
Expand Down Expand Up @@ -677,6 +679,10 @@ void LLAgent::moveAt(S32 direction, bool reset)

if (direction > 0)
{
if (!getFlying())
{
mLastJumpRequestTime = LLTimer::getTotalSeconds();
}
Comment thread
trish-sl marked this conversation as resolved.
Outdated
setControlFlags(AGENT_CONTROL_AT_POS | AGENT_CONTROL_FAST_AT);
}
else if (direction < 0)
Expand Down Expand Up @@ -2663,7 +2669,19 @@ 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);
// If the jump key is currently held, avoid forcing a finish-anim that can
// short-circuit the next pre-jump in cases of rapid successive jumps.
// Bug amplified since v7 viewers or so, likely caused by https://github.com/FirestormViewer/phoenix-firestorm/commit/da87e8bd370ea079576f8b412a4ddb80c0715bd1
// TODO: the real fix would be to discern which anim the viewer finished, but this requires simulator fixes.
Comment thread
trish-sl marked this conversation as resolved.
Outdated
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);

Comment thread
trish-sl marked this conversation as resolved.
if (!up_pos && !recent_jump)
{
setControlFlags(AGENT_CONTROL_FINISH_ANIM);
}
}
}

Expand Down
1 change: 1 addition & 0 deletions indra/newview/llagent.h
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ class LLAgent : public LLOldEvents::LLObservable
S32 mControlsTakenCount[TOTAL_CONTROLS];
S32 mControlsTakenPassedOnCount[TOTAL_CONTROLS];
U32 mControlFlags; // Replacement for the mFooKey's
F64 mLastJumpRequestTime;
Comment thread
marchcat marked this conversation as resolved.
Outdated

//--------------------------------------------------------------------
// Animations
Expand Down