Skip to content

Commit

Permalink
fix: SetWeaponDrawn on 3D loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbeBryssinck committed Apr 7, 2022
1 parent ef580ac commit e7919f9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
1 change: 0 additions & 1 deletion Code/client/Games/Skyrim/Actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@

#include <Games/Overrides.h>

#define SAVE_STUFF
#ifdef SAVE_STUFF

#include <Games/Skyrim/SaveLoad.h>
Expand Down
17 changes: 17 additions & 0 deletions Code/client/Services/Debug/TestService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,23 @@ void TestService::OnUpdate(const UpdateEvent& acUpdateEvent) noexcept
{
static std::atomic<bool> s_f8Pressed = false;
static std::atomic<bool> s_f7Pressed = false;
static std::atomic<bool> s_f6Pressed = false;

if (GetAsyncKeyState(VK_F6))
{
if (!s_f6Pressed)
{
s_f6Pressed = true;

static char s_address[256] = "127.0.0.1:10578";
if (!m_transport.IsOnline())
m_transport.Connect(s_address);
else
m_transport.Close();
}
}
else
s_f6Pressed = false;

if (GetAsyncKeyState(VK_F7))
{
Expand Down
1 change: 1 addition & 0 deletions Code/client/Services/Generic/CharacterService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,7 @@ void CharacterService::RunRemoteUpdates() const noexcept
pActor->SetActorInventory(remoteComponent.SpawnRequest.InventoryContent);
pActor->SetFactions(remoteComponent.SpawnRequest.FactionsContent);
pActor->LoadAnimationVariables(remoteComponent.SpawnRequest.LatestAction.Variables);
pActor->SetWeaponDrawnEx(remoteComponent.SpawnRequest.IsWeaponDrawn);

if (pActor->IsDead() != remoteComponent.SpawnRequest.IsDead)
remoteComponent.SpawnRequest.IsDead ? pActor->Kill() : pActor->Respawn();
Expand Down

0 comments on commit e7919f9

Please sign in to comment.