Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions Code/client/Games/Skyrim/Actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -875,16 +875,16 @@ extern thread_local bool g_forceAnimation;

void Actor::FixVampireLordModel() noexcept
{
TESBoundObject* pObject = Cast<TESBoundObject>(TESForm::GetById(0x2011a84));
if (!pObject)
TESBoundObject* pLordArmor = Cast<TESBoundObject>(TESForm::GetById(0x2011a84));
if (!pLordArmor)
return;

{
ScopedInventoryOverride _;
AddObjectToContainer(pObject, nullptr, 1, nullptr);
AddObjectToContainer(pLordArmor, nullptr, 1, nullptr);
}

EquipManager::Get()->Equip(this, pObject, nullptr, 1, nullptr, false, true, false, false);
EquipManager::Get()->Equip(this, pLordArmor, nullptr, 1, nullptr, false, true, false, false);

g_forceAnimation = true;

Expand Down
5 changes: 5 additions & 0 deletions Code/server/Game/Animation/ActionReplayCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,8 @@ std::optional<std::string_view> ActionReplayCache::FindInstantCounterpartForActi
}
return std::nullopt;
}

void ActionReplayCache::Clear() noexcept
{
m_actions.clear();
}
2 changes: 2 additions & 0 deletions Code/server/Game/Animation/ActionReplayCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class ActionReplayCache

const Vector<ActionEvent>& GetActions() const noexcept { return m_actions; };

void Clear() noexcept;

private:
// Returns true if clients should reset the animation graph of the Actor before replaying
bool RefineReplayCache() noexcept;
Expand Down
2 changes: 2 additions & 0 deletions Code/server/Game/Animation/AnimationEventLists.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ const Set<std::string_view> AnimationEventLists::kIgnore = {
{"idleChairVar2"},
{"idleChairArmsCrossedVar1"},
{"idleChairArmsCrossedVar2"},
// See `Actor::FixVampireLordModel`
{"LevitationToggle"},
// Weapon drawing is handled separately in CharacterService
{"WeapEquip"},
{"WeapSoloEquip"},
Expand Down
4 changes: 4 additions & 0 deletions Code/server/Services/CharacterService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,10 @@ void CharacterService::OnRequestRespawn(const PacketEvent<RequestRespawn>& acMes
}

auto& ownerComponent = view.get<OwnerComponent>(*it);

// Replay cache needs to be cleared when a character respawns
m_world.try_get<AnimationComponent>(*it)->ActionsReplayCache.Clear();

if (ownerComponent.GetOwner() == acMessage.pPlayer)
{
if (!acMessage.Packet.AppearanceBuffer.empty())
Expand Down
Loading