diff --git a/Project Reboot 3.0/FortGameModeAthena.cpp b/Project Reboot 3.0/FortGameModeAthena.cpp index 8b273a3..d945304 100644 --- a/Project Reboot 3.0/FortGameModeAthena.cpp +++ b/Project Reboot 3.0/FortGameModeAthena.cpp @@ -542,7 +542,7 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game if (AdditionalLevelsServerOnlyOffset != -1) { - /* TArray>& AdditionalLevelsServerOnly = CurrentPlaylist->Get>>(AdditionalLevelsServerOnlyOffset); + TArray>& AdditionalLevelsServerOnly = CurrentPlaylist->Get>>(AdditionalLevelsServerOnlyOffset); LOG_INFO(LogPlaylist, "Loading {} playlist server levels.", AdditionalLevelsServerOnly.Num()); for (int i = 0; i < AdditionalLevelsServerOnly.Num(); i++) @@ -553,7 +553,7 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game auto LevelNameWStr = std::wstring(LevelNameStr.begin(), LevelNameStr.end()); GameState->AddToAdditionalPlaylistLevelsStreamed(LevelFName, true); - } */ + } } LOG_INFO(LogPlaylist, "Loading {} playlist levels.", AdditionalLevels.Num()); @@ -580,10 +580,27 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game // There is another array of the ULevelStreaming, and I don't think this gets filled by the OnRep (since really our way is hacky as the OnRep has the implementation) } + static auto OnRep_AdditionalPlaylistLevelsStreamedFn = FindObject(L"/Script/FortniteGame.FortGameState.OnRep_AdditionalPlaylistLevelsStreamed"); + static auto OnFinishedStreamingAdditionalPlaylistLevelFn = FindObject(L"/Script/FortniteGame.FortGameState.OnFinishedStreamingAdditionalPlaylistLevel"); + static auto HandleAllPlaylistLevelsVisibleFn = FindObject(L"/Script/FortniteGame.FortGameState.HandleAllPlaylistLevelsVisible"); if (OnRep_AdditionalPlaylistLevelsStreamedFn) GameState->ProcessEvent(OnRep_AdditionalPlaylistLevelsStreamedFn); + + if (OnFinishedStreamingAdditionalPlaylistLevelFn) + GameState->ProcessEvent(OnFinishedStreamingAdditionalPlaylistLevelFn); + + if (HandleAllPlaylistLevelsVisibleFn) + GameState->ProcessEvent(HandleAllPlaylistLevelsVisibleFn); + + } + + if (Fortnite_Version >= 11.00) + { + + SetupEverythingAI(); + } } } diff --git a/Project Reboot 3.0/ai.h b/Project Reboot 3.0/ai.h index bf9164a..5892a94 100644 --- a/Project Reboot 3.0/ai.h +++ b/Project Reboot 3.0/ai.h @@ -150,7 +150,7 @@ static void SetupServerBotManager() UFortServerBotManagerAthena*& ServerBotManager = GameMode->GetServerBotManager(); if (!ServerBotManager) - ServerBotManager = (UFortServerBotManagerAthena*)UGameplayStatics::SpawnObject(FortServerBotManagerClass, GetTransientPackage()); + ServerBotManager = (UFortServerBotManagerAthena*)UGameplayStatics::SpawnObject(FortServerBotManagerClass, GameMode); if (ServerBotManager) {