From 8cdfa3aa00654615b7f5da5e24ede2ca9b062077 Mon Sep 17 00:00:00 2001 From: Gray <84999745+Milxnor@users.noreply.github.com> Date: Fri, 15 Mar 2024 07:55:29 -0400 Subject: [PATCH] Wow --- Project Reboot 3.0/Array.h | 2 ++ Project Reboot 3.0/FortGameModeAthena.cpp | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Project Reboot 3.0/Array.h b/Project Reboot 3.0/Array.h index a04a97d..5bd267f 100644 --- a/Project Reboot 3.0/Array.h +++ b/Project Reboot 3.0/Array.h @@ -413,8 +413,10 @@ public: return false; } + /* inline InElementType& operator[](uint32 Index) { return Data[Index]; } + */ }; \ No newline at end of file diff --git a/Project Reboot 3.0/FortGameModeAthena.cpp b/Project Reboot 3.0/FortGameModeAthena.cpp index 1c21b15..6567166 100644 --- a/Project Reboot 3.0/FortGameModeAthena.cpp +++ b/Project Reboot 3.0/FortGameModeAthena.cpp @@ -201,10 +201,10 @@ void AFortGameModeAthena::OverrideBattleBus(AFortGameStateAthena* GameState, UOb static auto DefaultBattleBusOffset = GameState->GetOffset("DefaultBattleBus"); GameState->Get(DefaultBattleBusOffset) = OverrideBattleBusSkin; - static auto FortAthenaAircraftClass = FindObject("/Script/FortniteGame.FortAthenaAircraft"); + static auto FortAthenaAircraftClass = FindObject(L"/Script/FortniteGame.FortAthenaAircraft"); auto AllAircrafts = UGameplayStatics::GetAllActorsOfClass(GetWorld(), FortAthenaAircraftClass); - for (int i = 0; i < AllAircrafts.Num(); i++) + for (int i = 0; i < AllAircrafts.Num(); ++i) { auto Aircraft = AllAircrafts.at(i); @@ -234,10 +234,10 @@ void AFortGameModeAthena::OverrideSupplyDrop(AFortGameStateAthena* GameState, UC auto MapInfo = GameState->Get(MapInfoOffset); static auto SupplyDropInfoListOffset = MapInfo->GetOffset("SupplyDropInfoList"); - auto SupplyDropInfoList = MapInfo->Get>(SupplyDropInfoListOffset); + auto& SupplyDropInfoList = MapInfo->Get>(SupplyDropInfoListOffset); - static auto SupplyDropClassOffset = SupplyDropInfoList[0]->GetOffset("SupplyDropClass"); - SupplyDropInfoList[0]->Get>(SupplyDropClassOffset) = OverrideSupplyDropBusClass; + static auto SupplyDropClassOffset = SupplyDropInfoList.at(0)->GetOffset("SupplyDropClass"); + SupplyDropInfoList.at(0)->Get>(SupplyDropClassOffset) = OverrideSupplyDropBusClass; LOG_INFO(LogGame, "Overridden SupplyDropClass: {}", OverrideSupplyDropBusClass->GetFullName()); } @@ -397,7 +397,7 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game } else { - if (Fortnite_Version >= 4) + if (Fortnite_Version >= 4.0) // ???? { SetPlaylist(PlaylistToUse, true); @@ -492,7 +492,9 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game } } + LOG_INFO(LogDev, "Getting playlist!"); GET_PLAYLIST(GameState); + LOG_INFO(LogDev, "Got playlist!"); if (CurrentPlaylist) { @@ -1200,8 +1202,8 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena } static auto BGAClass = FindObject(L"/Script/Engine.BlueprintGeneratedClass"); - static UObject* OverrideBattleBusSkin = nullptr; - static UClass* OverrideSupplyDropClass = LoadObject(L"/Game/Athena/SupplyDrops/AthenaSupplyDrop.AthenaSupplyDrop_C", BGAClass); + UObject* OverrideBattleBusSkin = nullptr; + UClass* OverrideSupplyDropClass = LoadObject(L"/Game/Athena/SupplyDrops/AthenaSupplyDrop.AthenaSupplyDrop_C", BGAClass); if (Fortnite_Version == 1.11 || Fortnite_Version == 7.30 || Fortnite_Version == 11.31 || Fortnite_Version == 15.10 || Fortnite_Version == 19.10) {