diff --git a/Project Reboot 3.0/FortGameModeAthena.cpp b/Project Reboot 3.0/FortGameModeAthena.cpp index b4ab954..418bc84 100644 --- a/Project Reboot 3.0/FortGameModeAthena.cpp +++ b/Project Reboot 3.0/FortGameModeAthena.cpp @@ -616,13 +616,23 @@ int AFortGameModeAthena::Athena_PickTeamHook(AFortGameModeAthena* GameMode, uint auto Playlist = GameState->GetCurrentPlaylist(); static int CurrentTeamMembers = 0; // bad + static int Current = 3; + + static int LastNum = 1; + + if (AmountOfRestarts != LastNum) + { + LastNum = AmountOfRestarts; + + Current = 3; + CurrentTeamMembers = 0; + } // std::cout << "Dru!\n"; if (!Playlist) { CurrentTeamMembers = 0; - static int Current = 3; LOG_INFO(LogTeams, "Player is going on team {} with {} members (No Playlist).", Current, CurrentTeamMembers); CurrentTeamMembers++; return Current++; @@ -630,6 +640,15 @@ int AFortGameModeAthena::Athena_PickTeamHook(AFortGameModeAthena* GameMode, uint static int NextTeamIndex = Playlist->Get("DefaultFirstTeam"); // + 1? + static int LastNum1 = 1; + + if (AmountOfRestarts != LastNum1) + { + LastNum1 = AmountOfRestarts; + + NextTeamIndex = Playlist->Get("DefaultFirstTeam"); + } + // std::cout << "CurrentTeamMembers: " << CurrentTeamMembers << '\n'; static auto MaxSquadSizeOffset = Playlist->GetOffset("MaxSquadSize"); @@ -766,8 +785,6 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena auto PlayerStateAthena = NewPlayer->GetPlayerStateAthena(); - LOG_INFO(LogDev, "PlayerStateAthena: {}", __int64(PlayerStateAthena)); - if (!PlayerStateAthena) return Athena_HandleStartingNewPlayerOriginal(GameMode, NewPlayerActor); diff --git a/Project Reboot 3.0/hooking.h b/Project Reboot 3.0/hooking.h index b7dd082..681c727 100644 --- a/Project Reboot 3.0/hooking.h +++ b/Project Reboot 3.0/hooking.h @@ -99,11 +99,14 @@ inline __int64 GetFunctionIdxOrPtr(UFunction* Function) { // LOG_INFO(LogDev, "0x{:x}", *(uint8_t*)(NativeAddr + i)); - if ((*(uint8_t*)(NativeAddr + i) == 0x41 && *(uint8_t*)(NativeAddr + i + 1) == 0xFF)) // wtf ue500 + if (Fortnite_Version >= 19) // We should NOT do this, instead, if we expect a validate and we don't find before C3, then search for 0x41 0xFF. { - LOG_INFO(LogDev, "Uhhhhhh report this to milxnor if u not on 18.40+ {}", Function->GetName()); - bFoundValidate = true; - continue; + if ((*(uint8_t*)(NativeAddr + i) == 0x41 && *(uint8_t*)(NativeAddr + i + 1) == 0xFF)) // wtf s18+ + { + LOG_INFO(LogDev, "Uhhhhhh report this to milxnor if u not on s19+ {}", Function->GetName()); + bFoundValidate = true; + continue; + } } if ((*(uint8_t*)(NativeAddr + i) == 0xFF && *(uint8_t*)(NativeAddr + i + 1) == 0x90) || // call qword ptr diff --git a/Project Reboot 3.0/reboot.h b/Project Reboot 3.0/reboot.h index e903972..93433ea 100644 --- a/Project Reboot 3.0/reboot.h +++ b/Project Reboot 3.0/reboot.h @@ -129,7 +129,7 @@ static __forceinline T* Cast(UObject* Object, bool bCheckType = true) return nullptr; } -extern inline int AmountOfRestarts = 0; +extern inline int AmountOfRestarts = 0; // DO NOT CHANGE struct PlaceholderBitfield {