Commit 155f47d
authored
Reduce the amount of sliding NPCs by caching and replaying animations (#811)
* Greatly reduce the amount of sliding NPCs by caching and replaying animations
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 being set up in their world
* No need for start actions, also removed `g_actionsSkipIntermediate` and related code
* Replace actions with instant counterparts when possible
* Simplify `ActionsToReplay` serialization in AssignCharacterResponse and CharacterSpawnRequest
`ApplyDifferential` doesn't work like I expected, and on top of that it doesn't cut that much bytes. We should be fine
* Add ability to replay actions manually in ComponentDebugView
* Small AnimationEventLists reorganization and renames
* Delay actions queued for replay if the first one is `IdleForceDefaultState`
(temporary solution)
* Replace `IdleForceDefaultState` plus a delay with a proper solution (call to `RevertAnimationGraphManager`)
* Remove redundant check in `ActorMediator::ForceAction`
Since we now check for readiness in `AnimationSystem::Update`
* More AnimationEventLists actions, remove some Exits, clean up
* Move call to `RefineReplayCache` to the right place; drop useless exit action
* Introduce `EarlyAnimationBufferComponent` to improve animation sync on cell enter
Particularly, when a party member enters the cell first, before the leader. Note that this commit also reverts af0561f (PR #762) as storing `LatestWeapEquipAnimation` is no longer necessary
* Add more actions to AnimationEventLists
* Address review comments: String -> std::string_view, and other misc and naming fixes1 parent 4f552c5 commit 155f47d
File tree
27 files changed
+614
-37
lines changed- Code
- client
- Components
- Games
- Animation
- Services
- Debug
- Views
- Generic
- Systems
- encoding
- Messages
- Structs
- server
- Components
- Game/Animation
- Services
27 files changed
+614
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | 57 | | |
61 | 58 | | |
62 | 59 | | |
| |||
117 | 114 | | |
118 | 115 | | |
119 | 116 | | |
120 | | - | |
| 117 | + | |
121 | 118 | | |
122 | 119 | | |
123 | 120 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
15 | 39 | | |
16 | 40 | | |
17 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
189 | 191 | | |
190 | 192 | | |
191 | 193 | | |
192 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
193 | 198 | | |
194 | 199 | | |
195 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
133 | 132 | | |
134 | 133 | | |
135 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
136 | 141 | | |
137 | 142 | | |
138 | 143 | | |
| |||
0 commit comments