File tree Expand file tree Collapse file tree 5 files changed +23
-0
lines changed Expand file tree Collapse file tree 5 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -94,3 +94,8 @@ std::optional<std::string_view> ActionReplayCache::FindInstantCounterpartForActi
9494 }
9595 return std::nullopt ;
9696}
97+
98+ void ActionReplayCache::Clear () noexcept
99+ {
100+ m_actions.clear ();
101+ }
Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ class ActionReplayCache
2525
2626 const Vector<ActionEvent>& GetActions () const noexcept { return m_actions; };
2727
28+ void Clear () noexcept ;
29+
2830private:
2931 // Returns true if clients should reset the animation graph of the Actor before replaying
3032 bool RefineReplayCache () noexcept ;
Original file line number Diff line number Diff line change @@ -177,6 +177,8 @@ const Set<std::string_view> AnimationEventLists::kIgnore = {
177177 {" idleChairVar2" },
178178 {" idleChairArmsCrossedVar1" },
179179 {" idleChairArmsCrossedVar2" },
180+ // See `Actor::FixVampireLordModel`
181+ {" LevitationToggle" },
180182 // Weapon drawing is handled separately in CharacterService
181183 {" WeapEquip" },
182184 {" WeapSoloEquip" },
Original file line number Diff line number Diff line change @@ -549,6 +549,13 @@ void CharacterService::OnRequestRespawn(const PacketEvent<RequestRespawn>& acMes
549549
550550 const auto resolvedEntity = *it;
551551 auto & ownerComponent = view.get <OwnerComponent>(*it);
552+ if (auto * pAnimationComponent = m_world.try_get <AnimationComponent>(resolvedEntity))
553+ {
554+ pAnimationComponent->Actions .clear ();
555+ pAnimationComponent->CurrentAction = {};
556+ pAnimationComponent->ActionsReplayCache .Clear ();
557+ }
558+
552559 if (ownerComponent.GetOwner () == acMessage.pPlayer )
553560 {
554561 if (!acMessage.Packet .AppearanceBuffer .empty ())
Original file line number Diff line number Diff line change @@ -173,6 +173,13 @@ void PlayerService::OnPlayerRespawnRequest(const PacketEvent<PlayerRespawnReques
173173 return ;
174174 }
175175
176+ if (auto * pAnimationComponent = m_world.try_get <AnimationComponent>(*entity))
177+ {
178+ pAnimationComponent->Actions .clear ();
179+ pAnimationComponent->CurrentAction = {};
180+ pAnimationComponent->ActionsReplayCache .Clear ();
181+ }
182+
176183 auto view = m_world.view <InventoryComponent>();
177184
178185 const auto it = view.find (*entity);
You can’t perform that action at this time.
0 commit comments