Skip to content

Commit

Permalink
fix: ft build
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbeBryssinck committed May 26, 2024
1 parent b8a13f6 commit 04f7e03
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
15 changes: 0 additions & 15 deletions Code/client/Games/References.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,15 +456,6 @@ void TESObjectREFR::Enable() const noexcept
s_pEnable(this, true);
}

uint32_t TESObjectREFR::GetAnimationVariableInt(BSFixedString* apVariableName) noexcept
{
using ObjectReference = TESObjectREFR;

PAPYRUS_FUNCTION(uint32_t, ObjectReference, GetAnimationVariableInt, BSFixedString*);

return s_pGetAnimationVariableInt(this, apVariableName);
}

// Skyrim: MoveTo() can fail, causing the object to be deleted
void TESObjectREFR::MoveTo(TESObjectCELL* apCell, const NiPoint3& acPosition) const noexcept
{
Expand Down Expand Up @@ -855,12 +846,6 @@ void Actor::StopCombat() noexcept
s_pStopCombat(this);
}

bool Actor::PlayIdle(TESIdleForm* apIdle) noexcept
{
PAPYRUS_FUNCTION(bool, Actor, PlayIdle, TESIdleForm*);
return s_pPlayIdle(this, apIdle);
}

bool Actor::HasPerk(uint32_t aPerkFormId) const noexcept
{
return GetPerkRank(aPerkFormId) != 0;
Expand Down
6 changes: 6 additions & 0 deletions Code/client/Games/Skyrim/Actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,12 @@ void Actor::Reset() noexcept
s_pReset(this, 0, nullptr);
}

bool Actor::PlayIdle(TESIdleForm* apIdle) noexcept
{
PAPYRUS_FUNCTION(bool, Actor, PlayIdle, TESIdleForm*);
return s_pPlayIdle(this, apIdle);
}

void Actor::Respawn() noexcept
{
Resurrect(false);
Expand Down
9 changes: 9 additions & 0 deletions Code/client/Games/Skyrim/TESObjectREFR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,15 @@ void TESObjectREFR::EnableImpl() noexcept
TiltedPhoques::ThisCall(s_enable, this, false);
}

uint32_t TESObjectREFR::GetAnimationVariableInt(BSFixedString* apVariableName) noexcept
{
using ObjectReference = TESObjectREFR;

PAPYRUS_FUNCTION(uint32_t, ObjectReference, GetAnimationVariableInt, BSFixedString*);

return s_pGetAnimationVariableInt(this, apVariableName);
}

static thread_local bool s_cancelAnimationWaitEvent = false;

bool TESObjectREFR::PlayAnimationAndWait(BSFixedString* apAnimation, BSFixedString* apEventName) noexcept
Expand Down
2 changes: 2 additions & 0 deletions Code/client/Services/Generic/CharacterService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1529,8 +1529,10 @@ void CharacterService::RunRemoteUpdates() noexcept
if (pActor->IsDead() != waitingFor3D.SpawnRequest.IsDead)
waitingFor3D.SpawnRequest.IsDead ? pActor->Kill() : pActor->Respawn();

#if TP_SKYRIM64
if (pActor->IsVampireLord())
pActor->FixVampireLordModel();
#endif

toRemove.push_back(entity);

Expand Down
2 changes: 2 additions & 0 deletions Code/client/Services/Generic/PlayerService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ void PlayerService::RunLevelUpdates() const noexcept

void PlayerService::RunBeastFormDetection() const noexcept
{
#if TP_SKYRIM64
static uint32_t lastRaceFormID = 0;
static std::chrono::steady_clock::time_point lastSendTimePoint;
constexpr auto cDelayBetweenUpdates = 250ms;
Expand All @@ -380,6 +381,7 @@ void PlayerService::RunBeastFormDetection() const noexcept
m_world.GetDispatcher().trigger(BeastFormChangeEvent());

lastRaceFormID = pPlayer->race->formID;
#endif
}

void PlayerService::ToggleDeathSystem(bool aSet) noexcept
Expand Down

0 comments on commit 04f7e03

Please sign in to comment.