Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed sliding NPCs by adding a replay cache for animations #757

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

miredirex
Copy link
Contributor

@miredirex miredirex commented Jan 5, 2025

Having a single LatestAction wasn't enough to bring Actors into a correct animation state. Now non-cell-owners (aka party members) will replay recently run animations when an Actor is spawned in their world

To discuss

  • Not sure if the addition of AnimationEventLists is even acceptable as it will be difficult to maintain the lists. Is there a better way? Comparing actions using ends_with or starts_with doesn't feel right either
  • Yeah I went the hardcoded route. What other approaches can we try? Serializing and sending animation graphs seems infeasible
  • Should the server manage all this animation logic? What could be delegated to clients?

TODOs

  • More testing: test with 3-4 players, test dead NPCs, test dragons
  • GetSitState, IsSwimming, GetSleepState checks and state enforcing
  • Sometimes moveStart is completely missing when it shouldn't
  • Substitute normal animations for Instant counterparts when possible
  • Double pass of weapon drawing sometimes cancels the latest queued animation
  • Clear replay cache when a cell has no owner/when an NPC loses its owner?
  • Extend F3 entity info for easier debugging
  • Reorganize code a bit: ReplayCache class/struct
  • Crashes found during testing: 1401909EC → 1402C3957, 14067644e → 140654fa4 → 1402b789a, 14067644e → 14064ff77 → 1402b789a. Might not be related to this fix at all, I don't know. Most often occurred during reconnects on the follower's side with lots of NPCs around

Having a single `LatestAction` wasn't enough to bring Actors into a correct animation state. Now non-cell-owners (aka party members) will replay recently ran animations when an Actor is spawned in their world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant