FIX - pre-jump and land animations being shortcircuited by race conditions with AGENT_CONTROL_FINISH_ANIM when chaining jumps#5409
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
marchcat
left a comment
There was a problem hiding this comment.
Thank you for the contribution!
There was a problem hiding this comment.
Pull request overview
This PR addresses race conditions where AGENT_CONTROL_FINISH_ANIM can prematurely cancel pre-jump and landing animations when chaining jumps, improving animation consistency under latency/lag.
Changes:
- Add
mLastJumpRequestTimeto track recent jump requests. - Gate sending
AGENT_CONTROL_FINISH_ANIMon pre-jump/land animation stop based on whether jump is currently held and whether a jump was requested recently.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
indra/newview/llagent.h |
Adds a new LLAgent member (mLastJumpRequestTime) to support jump/landing finish-anim gating. |
indra/newview/llagent.cpp |
Initializes the new member, updates the timestamp on input, and conditionally suppresses AGENT_CONTROL_FINISH_ANIM for pre-jump/land animations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Applied all of the above suggestions, let me know if there are any further improvements desired |
|
Let's merge it. @trish-sl, thank you again for your contribution! |
fixes FIRE-34049
fixes FIRE-34273
fixes this canny
related to #4218 LL viewer issue
.. and likely more tickets I have not unearthed.
Bug Repro
This bug is easy and difficult to reproduce at the same time. It's not only about the accidental quick jump. Depending on your animation length, your AO, your ping, your lag, etc. you will send AGENT_CONTROL_FINISH_ANIM flags while mid-landing animation or mid-prejumps. This effectively cancels some animation states early when the simulator has moved you to the next state (from landing to prejump, etc.). Even if you don't trigger a quick jump, you can see that by holding jump in place, on current release of most v7 viewers, the pre-jump and landing animations get cutoff at times.. or most of the time for some.
Expected Behavior
Animation states should play in full length, preventing early cancels and potential quickjumps when chaining jumps
Fix implementation notes
Please note that this fix doesn't impact the other technique known as "super jump" where jumping from an elevation change causes an abnormal amount of vertical velocity.
The settings to disable pre-jump animations still works as before.
Ideally, someone at the Lab would work on the simulator code to change how control flags work so the viewer can indicate which animation state it is done with.. In the meantime, viewers can mitigate this ambiguity by holding back on sending AGENT_CONTROL_FINISH_ANIM when actively jumping. The sim should maintain authority of the jump timings for controls to remain consistent.
The fix is done by not sending the flag while in a jumping sequence. I've tested myself with a decent North American ping (70ms) and I can notice huge improvements with all AOs I own, even without an AO. Jumping and landing looks proper and is much more consistent, we regain a lot of visual fidelity with this fix. A friend from EU also tried this patch with success. I've yet to find any side-effect to this. Considering how important it is to parts of the community, I would at least suggest a settings toggle for this fixes, if some side-effects are found when implemented.
As per my comment on canny, I believe the issue has been amplified by PBR viewer increasing lag/input delay at the time of release as well as this change to control flags handling.