mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 10:52:22 +01:00
fix crasgh & versioins
This commit is contained in:
@@ -239,7 +239,7 @@ void AFortGameModeAthena::OverrideSupplyDrop(AFortGameStateAthena* GameState, UC
|
|||||||
|
|
||||||
if (!MapInfo)
|
if (!MapInfo)
|
||||||
{
|
{
|
||||||
LOG_WARN(LogGame, "No MapInfo!");
|
LOG_WARN(LogGame, "[OverrideSupplyDrop] No MapInfo!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -711,6 +711,10 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
constexpr bool bIsAthenaMap = false;
|
||||||
|
|
||||||
|
if (bIsAthenaMap)
|
||||||
|
{
|
||||||
static auto FortPlayerStartCreativeClass = FindObject<UClass>(L"/Script/FortniteGame.FortPlayerStartCreative");
|
static auto FortPlayerStartCreativeClass = FindObject<UClass>(L"/Script/FortniteGame.FortPlayerStartCreative");
|
||||||
static auto FortPlayerStartWarmupClass = FindObject<UClass>(L"/Script/FortniteGame.FortPlayerStartWarmup");
|
static auto FortPlayerStartWarmupClass = FindObject<UClass>(L"/Script/FortniteGame.FortPlayerStartWarmup");
|
||||||
TArray<AActor*> Actors = UGameplayStatics::GetAllActorsOfClass(GetWorld(), Globals::bCreative ? FortPlayerStartCreativeClass : FortPlayerStartWarmupClass);
|
TArray<AActor*> Actors = UGameplayStatics::GetAllActorsOfClass(GetWorld(), Globals::bCreative ? FortPlayerStartCreativeClass : FortPlayerStartWarmupClass);
|
||||||
@@ -724,13 +728,14 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
|
|||||||
// LOG_INFO(LogDev, "No Actors!");
|
// LOG_INFO(LogDev, "No Actors!");
|
||||||
return false;
|
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.
|
// 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();
|
auto MapInfo = GameState->GetMapInfo();
|
||||||
|
|
||||||
if (Engine_Version >= 421 && // todo recheck this version
|
if (Engine_Version >= 421 // todo recheck this version
|
||||||
!MapInfo
|
&& (bIsAthenaMap ? !MapInfo : false)
|
||||||
)
|
)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
@@ -373,7 +373,7 @@ std::vector<LootDrop> PickLootDrops(FName TierGroupName, int WorldLevel, int For
|
|||||||
{
|
{
|
||||||
std::vector<LootDrop> LootDrops;
|
std::vector<LootDrop> LootDrops;
|
||||||
|
|
||||||
if (recursive > 6)
|
if (!TierGroupName.IsValid() || recursive > 6)
|
||||||
return LootDrops;
|
return LootDrops;
|
||||||
|
|
||||||
auto GameState = ((AFortGameModeAthena*)GetWorld()->GetGameMode())->GetGameStateAthena();
|
auto GameState = ((AFortGameModeAthena*)GetWorld()->GetGameMode())->GetGameStateAthena();
|
||||||
|
|||||||
@@ -703,14 +703,12 @@ void ChangeLevels()
|
|||||||
: Globals::bCreative ? L"Creative_NoApollo_Terrain"
|
: Globals::bCreative ? L"Creative_NoApollo_Terrain"
|
||||||
: L"Apollo_Terrain");
|
: L"Apollo_Terrain");
|
||||||
|
|
||||||
/* i think im dumb
|
if (bShouldUseMoleMap) // erms
|
||||||
if (bShouldUseMoleMap)
|
|
||||||
{
|
{
|
||||||
// FString MoleMap = L"/MoleGame/Maps/MoleGame_Layout.MoleGame_Layout";
|
// FString MoleMap = L"/MoleGame/Maps/MoleGame_Layout.MoleGame_Layout";
|
||||||
LevelB = L"open MoleGame_Layout";
|
LevelB = L"open MoleGame_Layout";
|
||||||
Level = L"MoleGame_Layout";
|
Level = L"MoleGame_Layout";
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
LOG_INFO(LogDev, "Using \"{}\" as our map.", bUseSwitchLevel ? Level.ToString() : LevelB.ToString());
|
LOG_INFO(LogDev, "Using \"{}\" as our map.", bUseSwitchLevel ? Level.ToString() : LevelB.ToString());
|
||||||
|
|
||||||
@@ -991,7 +989,9 @@ DWORD WINAPI Main(LPVOID)
|
|||||||
|
|
||||||
// Globals::bAutoRestart = IsRestartingSupported();
|
// Globals::bAutoRestart = IsRestartingSupported();
|
||||||
|
|
||||||
static auto GameModeDefault = FindObject<AFortGameModeAthena>(L"/Script/FortniteGame.Default__FortGameModeBR")
|
bool isPlayspaceGamemode = PlaylistName == "/MoleGame/Playlists/Playlist_MoleGame.Playlist_MoleGame";
|
||||||
|
static auto GameModeDefault = isPlayspaceGamemode ? FindObject<AFortGameModeAthena>(L"/Script/FortniteGame.Default__FortPlayspaceGameMode")
|
||||||
|
: FindObject<AFortGameModeAthena>(L"/Script/FortniteGame.Default__FortGameModeBR")
|
||||||
? FindObject<AFortGameModeAthena>(L"/Script/FortniteGame.Default__FortGameModeBR") // 22.30 atleast
|
? FindObject<AFortGameModeAthena>(L"/Script/FortniteGame.Default__FortGameModeBR") // 22.30 atleast
|
||||||
: FindObject<AFortGameModeAthena>(L"/Script/FortniteGame.Default__FortGameModeAthena");
|
: FindObject<AFortGameModeAthena>(L"/Script/FortniteGame.Default__FortGameModeAthena");
|
||||||
static auto FortPlayerControllerZoneDefault = FindObject<AFortPlayerController>(L"/Script/FortniteGame.Default__FortPlayerControllerZone");
|
static auto FortPlayerControllerZoneDefault = FindObject<AFortPlayerController>(L"/Script/FortniteGame.Default__FortPlayerControllerZone");
|
||||||
@@ -1126,7 +1126,7 @@ DWORD WINAPI Main(LPVOID)
|
|||||||
|
|
||||||
if (Fortnite_Version >= 16 && Fortnite_Version < 19)
|
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>(), (PVOID)EmptyHook); // also on 16.50
|
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>(), (PVOID)EmptyHook); // also on 16.50
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ static inline uint64 FindKickPlayer()
|
|||||||
{
|
{
|
||||||
if (Engine_Version == 416) // <1.8
|
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
|
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();
|
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)
|
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();
|
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;
|
return addr;
|
||||||
}
|
}
|
||||||
if (std::floor(Fortnite_Version) == 21)
|
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 21.00
|
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 (Fortnite_Version >= 6 && Fortnite_Version < 16)
|
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
|
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;
|
uint64 Ret = 0;
|
||||||
@@ -1610,8 +1612,6 @@ static inline uint64 FindGetNetMode()
|
|||||||
|
|
||||||
static inline uint64 FindApplyCharacterCustomization()
|
static inline uint64 FindApplyCharacterCustomization()
|
||||||
{
|
{
|
||||||
// RETURNS 0 ON 10.00!
|
|
||||||
|
|
||||||
// if (std::floor(Fortnite_Version) == 4) // RetrieveCharacterParts return null if dedicated server?????
|
// if (std::floor(Fortnite_Version) == 4) // RetrieveCharacterParts return null if dedicated server?????
|
||||||
// return 0;
|
// return 0;
|
||||||
|
|
||||||
@@ -1629,7 +1629,8 @@ static inline uint64 FindApplyCharacterCustomization()
|
|||||||
|
|
||||||
if (Fortnite_Version >= 15) // hm?
|
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;
|
return Addrr - i;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,3 +42,4 @@ extern inline std::string PlaylistName =
|
|||||||
// "/Game/Athena/Playlists/Creative/Playlist_PlaygroundV2.Playlist_PlaygroundV2";
|
// "/Game/Athena/Playlists/Creative/Playlist_PlaygroundV2.Playlist_PlaygroundV2";
|
||||||
// "/Game/Athena/Playlists/Ashton/Playlist_Ashton_Sm.Playlist_Ashton_Sm";
|
// "/Game/Athena/Playlists/Ashton/Playlist_Ashton_Sm.Playlist_Ashton_Sm";
|
||||||
// "/Game/Athena/Playlists/BattleLab/Playlist_BattleLab.Playlist_BattleLab";
|
// "/Game/Athena/Playlists/BattleLab/Playlist_BattleLab.Playlist_BattleLab";
|
||||||
|
// "/MoleGame/Playlists/Playlist_MoleGame.Playlist_MoleGame"; // very experimental dont use
|
||||||
@@ -1328,6 +1328,35 @@ static inline void MainUI()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (ImGui::Button("Set countdown 10"))
|
||||||
|
{
|
||||||
|
bStartedBus = true;
|
||||||
|
|
||||||
|
auto GameMode = (AFortGameMode*)GetWorld()->GetGameMode();
|
||||||
|
auto GameState = Cast<AFortGameStateAthena>(GameMode->GetGameState());
|
||||||
|
|
||||||
|
AmountOfPlayersWhenBusStart = GameState->GetPlayersLeft();
|
||||||
|
|
||||||
|
static auto WarmupCountdownEndTimeOffset = GameState->GetOffset("WarmupCountdownEndTime");
|
||||||
|
// GameState->Get<float>(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<float>(WarmupCountdownEndTimeOffset) = TimeSeconds + Duration;
|
||||||
|
GameMode->Get<float>(WarmupCountdownDurationOffset) = Duration;
|
||||||
|
|
||||||
|
// GameState->Get<float>(WarmupCountdownStartTimeOffset) = TimeSeconds;
|
||||||
|
GameMode->Get<float>(WarmupEarlyCountdownDurationOffset) = EarlyDuration;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (ImGui::Button("Dump Object Info"))
|
if (ImGui::Button("Dump Object Info"))
|
||||||
{
|
{
|
||||||
ObjectViewer::DumpContentsToFile(ObjectToDump, FileNameToSaveTo, bExcludeUnhandled);
|
ObjectViewer::DumpContentsToFile(ObjectToDump, FileNameToSaveTo, bExcludeUnhandled);
|
||||||
|
|||||||
Reference in New Issue
Block a user