Skip to content

Commit

Permalink
fix: build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbeBryssinck committed Jan 21, 2022
1 parent 400c12e commit 4826b8b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 33 deletions.
9 changes: 0 additions & 9 deletions Code/client/Games/Skyrim/Actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,15 +680,6 @@ bool TP_MAKE_THISCALL(HookInitiateMountPackage, Actor, Actor* apMount)
return ThisCall(RealInitiateMountPackage, apThis, apMount);
}

// TODO: dont cancel, request ownership
/*
if (ActorExtension* pMountExt = apMount->GetExtension())
{
if (pMountExt->IsRemote())
return false;
}
*/

World::Get().GetRunner().Trigger(MountEvent(apThis->formID, apMount->formID));
return ThisCall(RealInitiateMountPackage, apThis, apMount);
}
Expand Down
6 changes: 4 additions & 2 deletions Code/client/Services/Generic/CharacterService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,7 @@ void CharacterService::OnNotifyProjectileLaunch(const NotifyProjectileLaunch& ac

void CharacterService::OnMountEvent(const MountEvent& acEvent) const noexcept
{
#if TP_SKYRIM64
auto view = m_world.view<FormIdComponent>();

const auto riderIt = std::find_if(std::begin(view), std::end(view), [id = acEvent.RiderID, view](auto entity) {
Expand Down Expand Up @@ -1204,10 +1205,12 @@ void CharacterService::OnMountEvent(const MountEvent& acEvent) const noexcept
request.RiderId = riderServerIdRes.value();

m_transport.Send(request);
#endif
}

void CharacterService::OnNotifyMount(const NotifyMount& acMessage) const noexcept
{
#if TP_SKYRIM64
auto remoteView = m_world.view<RemoteComponent, FormIdComponent>();

const auto riderIt = std::find_if(std::begin(remoteView), std::end(remoteView), [remoteView, Id = acMessage.RiderId](auto entity)
Expand Down Expand Up @@ -1258,7 +1261,6 @@ void CharacterService::OnNotifyMount(const NotifyMount& acMessage) const noexcep
}

pRider->InitiateMountPackage(pMount);

spdlog::info("Rider mounted actor.");
#endif
}

23 changes: 1 addition & 22 deletions Code/client/Services/Generic/TestService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,28 +168,7 @@ void TestService::OnUpdate(const UpdateEvent& acUpdateEvent) noexcept
{
s_f8Pressed = true;

Actor* pActor = (Actor*)TESForm::GetById(0xFF0015AD);
PlayerCharacter::Get()->InitiateMountPackage(pActor);

/*
auto* pActor = (Actor*)TESForm::GetById(0xFF000DA5);
pActor->SetWeaponDrawnEx(true);
//PlaceActorInWorld();
const auto pPlayerBaseForm = static_cast<TESNPC*>(PlayerCharacter::Get()->baseForm);
//const auto pNpc = TESNPC::Create(data, pPlayerBaseForm->GetChangeFlags());
auto pActor = Actor::Create(pPlayerBaseForm);
pActor->SaveInventory(0);
#if TP_SKYRIM64
auto& objManager = DefaultObjectManager::Get();
spdlog::info(objManager.isSomeActionReady);
#endif
TP_ASSERT(0, "{}", 5)
*/
PlaceActorInWorld();
}
}
else
Expand Down

0 comments on commit 4826b8b

Please sign in to comment.