fixed mcp on s1-s7

This commit is contained in:
Milxnor
2023-03-27 19:47:48 -04:00
parent b4e88117a4
commit be83a14ed2
4 changed files with 30 additions and 9 deletions

View File

@@ -667,8 +667,14 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
if (MemberOffsets::FortPlayerState::PawnDeathLocation != 0)
DeadPlayerState->Get<FVector>(MemberOffsets::FortPlayerState::PawnDeathLocation) = DeathLocation;
LOG_INFO(LogDev, "Calling OnRep_DeathInfo.");
static auto OnRep_DeathInfoFn = FindObject<UFunction>("/Script/FortniteGame.FortPlayerStateAthena.OnRep_DeathInfo");
DeadPlayerState->ProcessEvent(OnRep_DeathInfoFn);
if (OnRep_DeathInfoFn)
DeadPlayerState->ProcessEvent(OnRep_DeathInfoFn);
LOG_INFO(LogDev, "Called OnRep_DeathInfo.");
if (KillerPlayerState && KillerPlayerState != DeadPlayerState)
{
@@ -681,6 +687,8 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
// KillerPlayerState->OnRep_Kills();
}
LOG_INFO(LogDev, "Reported kill.");
if (KillerPawn && KillerPawn != DeadPawn)
{
KillerPawn->SetHealth(100);