diff --git a/Project Reboot 3.0/FortGameModeAthena.cpp b/Project Reboot 3.0/FortGameModeAthena.cpp index b736371..42cbbef 100644 --- a/Project Reboot 3.0/FortGameModeAthena.cpp +++ b/Project Reboot 3.0/FortGameModeAthena.cpp @@ -239,7 +239,7 @@ void AFortGameModeAthena::OverrideSupplyDrop(AFortGameStateAthena* GameState, UC if (!MapInfo) { - LOG_WARN(LogGame, "No MapInfo!"); + LOG_WARN(LogGame, "[OverrideSupplyDrop] No MapInfo!"); return; } @@ -711,26 +711,31 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game } } - static auto FortPlayerStartCreativeClass = FindObject(L"/Script/FortniteGame.FortPlayerStartCreative"); - static auto FortPlayerStartWarmupClass = FindObject(L"/Script/FortniteGame.FortPlayerStartWarmup"); - TArray Actors = UGameplayStatics::GetAllActorsOfClass(GetWorld(), Globals::bCreative ? FortPlayerStartCreativeClass : FortPlayerStartWarmupClass); + constexpr bool bIsAthenaMap = false; - int ActorsNum = Actors.Num(); - - Actors.Free(); - - if (ActorsNum == 0) + if (bIsAthenaMap) { - // LOG_INFO(LogDev, "No Actors!"); - return false; + static auto FortPlayerStartCreativeClass = FindObject(L"/Script/FortniteGame.FortPlayerStartCreative"); + static auto FortPlayerStartWarmupClass = FindObject(L"/Script/FortniteGame.FortPlayerStartWarmup"); + TArray Actors = UGameplayStatics::GetAllActorsOfClass(GetWorld(), Globals::bCreative ? FortPlayerStartCreativeClass : FortPlayerStartWarmupClass); + + int ActorsNum = Actors.Num(); + + Actors.Free(); + + if (ActorsNum == 0) + { + // LOG_INFO(LogDev, "No Actors!"); + return false; + } } // I don't think this map info check is proper.. We can loop through the Actors in the World's PersistentLevel and check if there is a MapInfo, if there is then we can wait, else don't. auto MapInfo = GameState->GetMapInfo(); - if (Engine_Version >= 421 && // todo recheck this version - !MapInfo + if (Engine_Version >= 421 // todo recheck this version + && (bIsAthenaMap ? !MapInfo : false) ) return false; diff --git a/Project Reboot 3.0/FortLootPackage.cpp b/Project Reboot 3.0/FortLootPackage.cpp index ac2b919..643ec8d 100644 --- a/Project Reboot 3.0/FortLootPackage.cpp +++ b/Project Reboot 3.0/FortLootPackage.cpp @@ -373,7 +373,7 @@ std::vector PickLootDrops(FName TierGroupName, int WorldLevel, int For { std::vector LootDrops; - if (recursive > 6) + if (!TierGroupName.IsValid() || recursive > 6) return LootDrops; auto GameState = ((AFortGameModeAthena*)GetWorld()->GetGameMode())->GetGameStateAthena(); diff --git a/Project Reboot 3.0/dllmain.cpp b/Project Reboot 3.0/dllmain.cpp index fb73dcf..1783bd9 100644 --- a/Project Reboot 3.0/dllmain.cpp +++ b/Project Reboot 3.0/dllmain.cpp @@ -703,14 +703,12 @@ void ChangeLevels() : Globals::bCreative ? L"Creative_NoApollo_Terrain" : L"Apollo_Terrain"); - /* i think im dumb - if (bShouldUseMoleMap) + if (bShouldUseMoleMap) // erms { // FString MoleMap = L"/MoleGame/Maps/MoleGame_Layout.MoleGame_Layout"; LevelB = L"open MoleGame_Layout"; Level = L"MoleGame_Layout"; } - */ LOG_INFO(LogDev, "Using \"{}\" as our map.", bUseSwitchLevel ? Level.ToString() : LevelB.ToString()); @@ -991,7 +989,9 @@ DWORD WINAPI Main(LPVOID) // Globals::bAutoRestart = IsRestartingSupported(); - static auto GameModeDefault = FindObject(L"/Script/FortniteGame.Default__FortGameModeBR") + bool isPlayspaceGamemode = PlaylistName == "/MoleGame/Playlists/Playlist_MoleGame.Playlist_MoleGame"; + static auto GameModeDefault = isPlayspaceGamemode ? FindObject(L"/Script/FortniteGame.Default__FortPlayspaceGameMode") + : FindObject(L"/Script/FortniteGame.Default__FortGameModeBR") ? FindObject(L"/Script/FortniteGame.Default__FortGameModeBR") // 22.30 atleast : FindObject(L"/Script/FortniteGame.Default__FortGameModeAthena"); static auto FortPlayerControllerZoneDefault = FindObject(L"/Script/FortniteGame.Default__FortPlayerControllerZone"); @@ -1126,7 +1126,7 @@ DWORD WINAPI Main(LPVOID) if (Fortnite_Version >= 16 && Fortnite_Version < 19) { - // Bus crash (only needed if we are calling StartAircraftPhase on seperate thread I THINK) (sometimes) + // Bus crash (only needed if we are calling StartAircraftPhase on separate thread I THINK) (sometimes) Hooking::MinHook::Hook(Memcury::Scanner::FindPattern("48 89 5C 24 ? 48 89 6C 24 ? 56 57 41 54 41 56 41 57 48 83 EC 40 48 8B 59 28 45 33 E4").GetAs(), (PVOID)EmptyHook); // also on 16.50 } diff --git a/Project Reboot 3.0/finder.h b/Project Reboot 3.0/finder.h index e239c94..44fca70 100644 --- a/Project Reboot 3.0/finder.h +++ b/Project Reboot 3.0/finder.h @@ -317,7 +317,7 @@ static inline uint64 FindKickPlayer() { if (Engine_Version == 416) // <1.8 return Memcury::Scanner::FindPattern("40 53 56 48 81 EC ? ? ? ? 48 8B DA 48 8B F1 E8 ? ? ? ? 48 8B 06 48 8B CE").Get(); // postlogin - if (Engine_Version == 419) // 1.11 & 2.4.2 + if (Engine_Version == 419 || Engine_Version == 420) // 1.11 & 2.4.2 & 4.1 & 4.5 return Memcury::Scanner::FindPattern("40 53 56 41 56 48 81 EC ? ? ? ? 45 33 F6 48 8B DA 44 89 B4 24 ? ? ? ? 48 8B F1 E8 ? ? ? ? 48 8B 06 48 8B CE FF 90 ? ? ? ? 48 8B 8B ? ? ? ? 48 85 C9 74").Get(); if (std::floor(Fortnite_Version) == 18) return Memcury::Scanner::FindPattern("48 8B C4 48 89 58 08 48 89 70 10 48 89 78 18 4C 89 60 20 55 41 56 41 57 48 8B EC 48 83 EC 60 48 83 65 ? ? 4C 8B F2 83 65 E8 00 4C 8B E1 83 65 EC").Get(); @@ -333,9 +333,11 @@ static inline uint64 FindKickPlayer() return addr; } - if (std::floor(Fortnite_Version) == 21) - return Memcury::Scanner::FindPattern("48 89 5C 24 ? 55 56 57 41 54 41 55 41 56 41 57 48 8D 6C 24 ? 48 81 EC ? ? ? ? 45 33 ED 48 8B FA 41 8B DD 4C 8B").Get(); // checked 21.00 - if (Fortnite_Version >= 6 && Fortnite_Version < 16) + if (std::floor(Fortnite_Version) == 20 || std::floor(Fortnite_Version) == 21) + return Memcury::Scanner::FindPattern("48 89 5C 24 ? 55 56 57 41 54 41 55 41 56 41 57 48 8D 6C 24 ? 48 81 EC ? ? ? ? 45 33 ED 48 8B FA 41 8B DD 4C 8B").Get(); // checked 20.40 21.00 + if (Engine_Version == 421) + return Memcury::Scanner::FindPattern("40 53 55 41 56 48 81 EC ? ? ? ? 33 ED 48 8B DA 89 AC 24 ? ? ? ? 4C 8B F1 E8 ? ? ? ? 49").Get(); // checked 5.41 & 6.21 + if (Fortnite_Version >= 7 && Fortnite_Version < 16) return Memcury::Scanner::FindPattern("48 89 5C 24 08 48 89 74 24 10 57 48 83 EC ? 49 8B F0 48 8B DA 48 85 D2").Get(); // checked 6.00, 6.21, 7.00, 8.00, 14.40, 15.50 uint64 Ret = 0; @@ -1610,8 +1612,6 @@ static inline uint64 FindGetNetMode() static inline uint64 FindApplyCharacterCustomization() { - // RETURNS 0 ON 10.00! - // if (std::floor(Fortnite_Version) == 4) // RetrieveCharacterParts return null if dedicated server????? // return 0; @@ -1629,7 +1629,8 @@ static inline uint64 FindApplyCharacterCustomization() if (Fortnite_Version >= 15) // hm? { - if (*(uint8_t*)(uint8_t*)(Addrr - i) == 0x48 && *(uint8_t*)(uint8_t*)(Addrr - i + 1) == 0x89 && *(uint8_t*)(uint8_t*)(Addrr - i + 2) == 0x5C) + if (*(uint8_t*)(uint8_t*)(Addrr - i) == 0x48 && *(uint8_t*)(uint8_t*)(Addrr - i + 1) == 0x89 + && (*(uint8_t*)(uint8_t*)(Addrr - i + 2) == 0x5C || *(uint8_t*)(uint8_t*)(Addrr - i + 2) == 0x54)) // 10.00 { return Addrr - i; } diff --git a/Project Reboot 3.0/globals.h b/Project Reboot 3.0/globals.h index 037c792..c4d7ce5 100644 --- a/Project Reboot 3.0/globals.h +++ b/Project Reboot 3.0/globals.h @@ -34,11 +34,12 @@ extern inline std::string PlaylistName = "/Game/Athena/Playlists/Playlist_DefaultSolo.Playlist_DefaultSolo"; // "/Game/Athena/Playlists/gg/Playlist_Gg_Reverse.Playlist_Gg_Reverse"; // "/Game/Athena/Playlists/Playlist_DefaultDuo.Playlist_DefaultDuo"; -//"/Game/Athena/Playlists/Playground/Playlist_Playground.Playlist_Playground"; +// "/Game/Athena/Playlists/Playground/Playlist_Playground.Playlist_Playground"; // "/Game/Athena/Playlists/Carmine/Playlist_Carmine.Playlist_Carmine"; // "/Game/Athena/Playlists/Fill/Playlist_Fill_Solo.Playlist_Fill_Solo"; // "/Game/Athena/Playlists/Low/Playlist_Low_Solo.Playlist_Low_Solo"; // "/Game/Athena/Playlists/Bling/Playlist_Bling_Solo.Playlist_Bling_Solo"; // "/Game/Athena/Playlists/Creative/Playlist_PlaygroundV2.Playlist_PlaygroundV2"; // "/Game/Athena/Playlists/Ashton/Playlist_Ashton_Sm.Playlist_Ashton_Sm"; -// "/Game/Athena/Playlists/BattleLab/Playlist_BattleLab.Playlist_BattleLab"; \ No newline at end of file +// "/Game/Athena/Playlists/BattleLab/Playlist_BattleLab.Playlist_BattleLab"; +// "/MoleGame/Playlists/Playlist_MoleGame.Playlist_MoleGame"; // very experimental dont use \ No newline at end of file diff --git a/Project Reboot 3.0/gui.h b/Project Reboot 3.0/gui.h index a5e18f5..f313d29 100644 --- a/Project Reboot 3.0/gui.h +++ b/Project Reboot 3.0/gui.h @@ -1328,6 +1328,35 @@ static inline void MainUI() } } + /* + if (ImGui::Button("Set countdown 10")) + { + bStartedBus = true; + + auto GameMode = (AFortGameMode*)GetWorld()->GetGameMode(); + auto GameState = Cast(GameMode->GetGameState()); + + AmountOfPlayersWhenBusStart = GameState->GetPlayersLeft(); + + static auto WarmupCountdownEndTimeOffset = GameState->GetOffset("WarmupCountdownEndTime"); + // GameState->Get(WarmupCountdownEndTimeOffset) = UGameplayStatics::GetTimeSeconds(GetWorld()) + 10; + + float TimeSeconds = GameState->GetServerWorldTimeSeconds(); // UGameplayStatics::GetTimeSeconds(GetWorld()); + float Duration = 10; + float EarlyDuration = Duration; + + static auto WarmupCountdownStartTimeOffset = GameState->GetOffset("WarmupCountdownStartTime"); + static auto WarmupCountdownDurationOffset = GameMode->GetOffset("WarmupCountdownDuration"); + static auto WarmupEarlyCountdownDurationOffset = GameMode->GetOffset("WarmupEarlyCountdownDuration"); + + GameState->Get(WarmupCountdownEndTimeOffset) = TimeSeconds + Duration; + GameMode->Get(WarmupCountdownDurationOffset) = Duration; + + // GameState->Get(WarmupCountdownStartTimeOffset) = TimeSeconds; + GameMode->Get(WarmupEarlyCountdownDurationOffset) = EarlyDuration; + } + */ + if (ImGui::Button("Dump Object Info")) { ObjectViewer::DumpContentsToFile(ObjectToDump, FileNameToSaveTo, bExcludeUnhandled);