This commit is contained in:
Gray
2024-03-12 19:58:43 -04:00
parent 512fb16ee4
commit 72a2afcb72
9 changed files with 62 additions and 26 deletions

View File

@@ -918,6 +918,13 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
}
}
static auto ReplicationDriverOffset = GetWorld()->GetNetDriver()->GetOffset("ReplicationDriver", false); // If netdriver is null the world blows up
Globals::bShouldUseReplicationGraph = (!(ReplicationDriverOffset == -1 || Fortnite_Version >= 20))
&& Fortnite_Version != 3.3; // RepGraph is half implemented
LOG_INFO(LogDev, "bShouldUseReplicationGraph: {}", Globals::bShouldUseReplicationGraph);
Globals::bStartedListening = true;
}
@@ -1351,7 +1358,8 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena
}
}
NewPlayer->GetMatchReport() = (UAthenaPlayerMatchReport*)UGameplayStatics::SpawnObject(UAthenaPlayerMatchReport::StaticClass(), NewPlayer); // idk when to do this
if (auto MatchReportPtr = NewPlayer->GetMatchReport())
*MatchReportPtr = (UAthenaPlayerMatchReport*)UGameplayStatics::SpawnObject(UAthenaPlayerMatchReport::StaticClass(), NewPlayer); // idk when to do this
static auto SquadIdOffset = PlayerStateAthena->GetOffset("SquadId", false);