mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
a bit
fix some levels not streaming in, add unvaulting & showdown event (unvaulting levels after event don't really work), fixed some crashes.
This commit is contained in:
@@ -350,6 +350,8 @@ void PlayerTabs()
|
||||
}
|
||||
}
|
||||
|
||||
static bool bStartedBus = false;
|
||||
|
||||
void MainUI()
|
||||
{
|
||||
bool bLoaded = true;
|
||||
@@ -366,7 +368,7 @@ void MainUI()
|
||||
#ifndef PROD
|
||||
ImGui::Checkbox("Log ProcessEvent", &Globals::bLogProcessEvent);
|
||||
#endif
|
||||
ImGui::Text(std::format("Listening {}", Globals::bStartedListening).c_str());
|
||||
ImGui::Text(std::format("Joinable {}", Globals::bStartedListening).c_str());
|
||||
|
||||
static std::string ConsoleCommand;
|
||||
|
||||
@@ -412,6 +414,7 @@ void MainUI()
|
||||
Globals::bInitializedPlaylist = false;
|
||||
Globals::bStartedListening = false;
|
||||
Globals::bHitReadyToStartMatch = false;
|
||||
bStartedBus = false;
|
||||
AmountOfRestarts++;
|
||||
}
|
||||
else
|
||||
@@ -420,141 +423,148 @@ void MainUI()
|
||||
}
|
||||
}
|
||||
|
||||
if (Globals::bLateGame)
|
||||
if (!bStartedBus)
|
||||
{
|
||||
if (ImGui::Button("Start Bus"))
|
||||
if (Globals::bLateGame.load())
|
||||
{
|
||||
auto GameMode = (AFortGameMode*)GetWorld()->GetGameMode();
|
||||
auto GameState = GameMode->GetGameState();
|
||||
|
||||
static auto AircraftsOffset = GameState->GetOffset("Aircrafts");
|
||||
|
||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"startaircraft", nullptr);
|
||||
|
||||
while (GameState->GetPtr<TArray<AActor*>>(AircraftsOffset)->Num() <= 0) // hmm
|
||||
if (ImGui::Button("Start Bus"))
|
||||
{
|
||||
Sleep(500);
|
||||
}
|
||||
bStartedBus = true;
|
||||
|
||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"startsafezone", nullptr);
|
||||
auto GameMode = (AFortGameMode*)GetWorld()->GetGameMode();
|
||||
auto GameState = GameMode->GetGameState();
|
||||
|
||||
static auto SafeZoneLocationsOffset = GameMode->GetOffset("SafeZoneLocations");
|
||||
auto& SafeZoneLocations = GameMode->Get<TArray<FVector>>(SafeZoneLocationsOffset);
|
||||
static auto AircraftsOffset = GameState->GetOffset("Aircrafts");
|
||||
|
||||
LOG_INFO(LogDev, "SafeZoneLocations.Num(): {}", SafeZoneLocations.Num());
|
||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"startaircraft", nullptr);
|
||||
|
||||
static auto SafeZoneIndicatorOffset = GameState->GetOffset("SafeZoneIndicator");
|
||||
|
||||
static auto SafeZonesStartTimeOffset = GameState->GetOffset("SafeZonesStartTime");
|
||||
GameState->Get<float>(SafeZonesStartTimeOffset) = 0;
|
||||
|
||||
while (!GameState->Get(SafeZoneIndicatorOffset))
|
||||
{
|
||||
Sleep(500);
|
||||
}
|
||||
|
||||
while (GameState->GetPtr<TArray<AActor*>>(AircraftsOffset)->Num() <= 0) // hmm
|
||||
{
|
||||
Sleep(500);
|
||||
}
|
||||
|
||||
static auto NextNextCenterOffset = GameState->Get(SafeZoneIndicatorOffset)->GetOffset("NextNextCenter");
|
||||
static auto NextCenterOffset = GameState->Get(SafeZoneIndicatorOffset)->GetOffset("NextCenter");
|
||||
FVector LocationToStartAircraft = GameState->Get(SafeZoneIndicatorOffset)->Get<FVector>(NextNextCenterOffset); // SafeZoneLocations.at(4);
|
||||
LocationToStartAircraft.Z += 10000;
|
||||
|
||||
for (int i = 0; i < GameState->GetPtr<TArray<AActor*>>(AircraftsOffset)->Num(); i++)
|
||||
{
|
||||
GameState->GetPtr<TArray<AActor*>>(AircraftsOffset)->at(i)->TeleportTo(LocationToStartAircraft, FRotator());
|
||||
|
||||
static auto FlightInfoOffset = GameState->GetPtr<TArray<AActor*>>(AircraftsOffset)->at(i)->GetOffset("FlightInfo");
|
||||
auto FlightInfo = GameState->GetPtr<TArray<AActor*>>(AircraftsOffset)->at(i)->GetPtr<FAircraftFlightInfo>(FlightInfoOffset);
|
||||
|
||||
FlightInfo->GetFlightSpeed() = 0;
|
||||
FlightInfo->GetFlightStartLocation() = LocationToStartAircraft;
|
||||
FlightInfo->GetTimeTillDropStart() = 0.0f;
|
||||
}
|
||||
|
||||
static auto MapInfoOffset = GameState->GetOffset("MapInfo");
|
||||
auto MapInfo = GameState->Get(MapInfoOffset);
|
||||
|
||||
if (MapInfo)
|
||||
{
|
||||
static auto FlightInfosOffset = MapInfo->GetOffset("FlightInfos");
|
||||
auto& FlightInfos = MapInfo->Get<TArray<FAircraftFlightInfo>>(FlightInfosOffset);
|
||||
|
||||
LOG_INFO(LogDev, "FlightInfos.Num(): {}", FlightInfos.Num());
|
||||
|
||||
for (int i = 0; i < FlightInfos.Num(); i++)
|
||||
while (GameState->GetPtr<TArray<AActor*>>(AircraftsOffset)->Num() <= 0) // hmm
|
||||
{
|
||||
auto FlightInfo = FlightInfos.AtPtr(i, FAircraftFlightInfo::GetStructSize());
|
||||
Sleep(500);
|
||||
}
|
||||
|
||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"startsafezone", nullptr);
|
||||
|
||||
static auto SafeZoneLocationsOffset = GameMode->GetOffset("SafeZoneLocations");
|
||||
auto& SafeZoneLocations = GameMode->Get<TArray<FVector>>(SafeZoneLocationsOffset);
|
||||
|
||||
LOG_INFO(LogDev, "SafeZoneLocations.Num(): {}", SafeZoneLocations.Num());
|
||||
|
||||
static auto SafeZoneIndicatorOffset = GameState->GetOffset("SafeZoneIndicator");
|
||||
|
||||
static auto SafeZonesStartTimeOffset = GameState->GetOffset("SafeZonesStartTime");
|
||||
GameState->Get<float>(SafeZonesStartTimeOffset) = 0;
|
||||
|
||||
while (!GameState->Get(SafeZoneIndicatorOffset))
|
||||
{
|
||||
Sleep(500);
|
||||
}
|
||||
|
||||
while (GameState->GetPtr<TArray<AActor*>>(AircraftsOffset)->Num() <= 0) // hmm
|
||||
{
|
||||
Sleep(500);
|
||||
}
|
||||
|
||||
static auto NextNextCenterOffset = GameState->Get(SafeZoneIndicatorOffset)->GetOffset("NextNextCenter");
|
||||
static auto NextCenterOffset = GameState->Get(SafeZoneIndicatorOffset)->GetOffset("NextCenter");
|
||||
FVector LocationToStartAircraft = GameState->Get(SafeZoneIndicatorOffset)->Get<FVector>(NextNextCenterOffset); // SafeZoneLocations.at(4);
|
||||
LocationToStartAircraft.Z += 10000;
|
||||
|
||||
for (int i = 0; i < GameState->GetPtr<TArray<AActor*>>(AircraftsOffset)->Num(); i++)
|
||||
{
|
||||
GameState->GetPtr<TArray<AActor*>>(AircraftsOffset)->at(i)->TeleportTo(LocationToStartAircraft, FRotator());
|
||||
|
||||
static auto FlightInfoOffset = GameState->GetPtr<TArray<AActor*>>(AircraftsOffset)->at(i)->GetOffset("FlightInfo");
|
||||
auto FlightInfo = GameState->GetPtr<TArray<AActor*>>(AircraftsOffset)->at(i)->GetPtr<FAircraftFlightInfo>(FlightInfoOffset);
|
||||
|
||||
FlightInfo->GetFlightSpeed() = 0;
|
||||
FlightInfo->GetFlightStartLocation() = LocationToStartAircraft;
|
||||
FlightInfo->GetTimeTillDropStart() = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
static auto bAircraftIsLockedOffset = GameState->GetOffset("bAircraftIsLocked");
|
||||
static auto bAircraftIsLockedFieldMask = GetFieldMask(GameState->GetProperty("bAircraftIsLocked"));
|
||||
GameState->SetBitfieldValue(bAircraftIsLockedOffset, bAircraftIsLockedFieldMask, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ImGui::Button("Start Bus Countdown"))
|
||||
{
|
||||
auto GameMode = (AFortGameMode*)GetWorld()->GetGameMode();
|
||||
auto GameState = GameMode->GetGameState();
|
||||
static auto MapInfoOffset = GameState->GetOffset("MapInfo");
|
||||
auto MapInfo = GameState->Get(MapInfoOffset);
|
||||
|
||||
if (Fortnite_Version == 1.11)
|
||||
{
|
||||
static auto OverrideBattleBusSkin = FindObject("/Game/Athena/Items/Cosmetics/BattleBuses/BBID_WinterBus.BBID_WinterBus");
|
||||
LOG_INFO(LogDev, "OverrideBattleBusSkin: {}", __int64(OverrideBattleBusSkin));
|
||||
|
||||
if (OverrideBattleBusSkin)
|
||||
if (MapInfo)
|
||||
{
|
||||
static auto AssetManagerOffset = GetEngine()->GetOffset("AssetManager");
|
||||
auto AssetManager = GetEngine()->Get(AssetManagerOffset);
|
||||
static auto FlightInfosOffset = MapInfo->GetOffset("FlightInfos");
|
||||
auto& FlightInfos = MapInfo->Get<TArray<FAircraftFlightInfo>>(FlightInfosOffset);
|
||||
|
||||
if (AssetManager)
|
||||
LOG_INFO(LogDev, "FlightInfos.Num(): {}", FlightInfos.Num());
|
||||
|
||||
for (int i = 0; i < FlightInfos.Num(); i++)
|
||||
{
|
||||
static auto AthenaGameDataOffset = AssetManager->GetOffset("AthenaGameData");
|
||||
auto AthenaGameData = AssetManager->Get(AthenaGameDataOffset);
|
||||
auto FlightInfo = FlightInfos.AtPtr(i, FAircraftFlightInfo::GetStructSize());
|
||||
|
||||
if (AthenaGameData)
|
||||
{
|
||||
static auto DefaultBattleBusSkinOffset = AthenaGameData->GetOffset("DefaultBattleBusSkin");
|
||||
AthenaGameData->Get(DefaultBattleBusSkinOffset) = OverrideBattleBusSkin;
|
||||
}
|
||||
FlightInfo->GetFlightSpeed() = 0;
|
||||
FlightInfo->GetFlightStartLocation() = LocationToStartAircraft;
|
||||
FlightInfo->GetTimeTillDropStart() = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
static auto DefaultBattleBusOffset = GameState->GetOffset("DefaultBattleBus");
|
||||
GameState->Get(DefaultBattleBusOffset) = OverrideBattleBusSkin;
|
||||
static auto bAircraftIsLockedOffset = GameState->GetOffset("bAircraftIsLocked");
|
||||
static auto bAircraftIsLockedFieldMask = GetFieldMask(GameState->GetProperty("bAircraftIsLocked"));
|
||||
GameState->SetBitfieldValue(bAircraftIsLockedOffset, bAircraftIsLockedFieldMask, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ImGui::Button("Start Bus Countdown"))
|
||||
{
|
||||
bStartedBus = true;
|
||||
|
||||
static auto FortAthenaAircraftClass = FindObject<UClass>("/Script/FortniteGame.FortAthenaAircraft");
|
||||
auto AllAircrafts = UGameplayStatics::GetAllActorsOfClass(GetWorld(), FortAthenaAircraftClass);
|
||||
auto GameMode = (AFortGameMode*)GetWorld()->GetGameMode();
|
||||
auto GameState = GameMode->GetGameState();
|
||||
|
||||
for (int i = 0; i < AllAircrafts.Num(); i++)
|
||||
if (Fortnite_Version == 1.11)
|
||||
{
|
||||
static auto OverrideBattleBusSkin = FindObject("/Game/Athena/Items/Cosmetics/BattleBuses/BBID_WinterBus.BBID_WinterBus");
|
||||
LOG_INFO(LogDev, "OverrideBattleBusSkin: {}", __int64(OverrideBattleBusSkin));
|
||||
|
||||
if (OverrideBattleBusSkin)
|
||||
{
|
||||
auto Aircraft = AllAircrafts.at(i);
|
||||
static auto AssetManagerOffset = GetEngine()->GetOffset("AssetManager");
|
||||
auto AssetManager = GetEngine()->Get(AssetManagerOffset);
|
||||
|
||||
static auto DefaultBusSkinOffset = Aircraft->GetOffset("DefaultBusSkin");
|
||||
Aircraft->Get(DefaultBusSkinOffset) = OverrideBattleBusSkin;
|
||||
|
||||
static auto SpawnedCosmeticActorOffset = Aircraft->GetOffset("SpawnedCosmeticActor");
|
||||
auto SpawnedCosmeticActor = Aircraft->Get<AActor*>(SpawnedCosmeticActorOffset);
|
||||
|
||||
if (SpawnedCosmeticActor)
|
||||
if (AssetManager)
|
||||
{
|
||||
static auto ActiveSkinOffset = SpawnedCosmeticActor->GetOffset("ActiveSkin");
|
||||
SpawnedCosmeticActor->Get(ActiveSkinOffset) = OverrideBattleBusSkin;
|
||||
static auto AthenaGameDataOffset = AssetManager->GetOffset("AthenaGameData");
|
||||
auto AthenaGameData = AssetManager->Get(AthenaGameDataOffset);
|
||||
|
||||
if (AthenaGameData)
|
||||
{
|
||||
static auto DefaultBattleBusSkinOffset = AthenaGameData->GetOffset("DefaultBattleBusSkin");
|
||||
AthenaGameData->Get(DefaultBattleBusSkinOffset) = OverrideBattleBusSkin;
|
||||
}
|
||||
}
|
||||
|
||||
static auto DefaultBattleBusOffset = GameState->GetOffset("DefaultBattleBus");
|
||||
GameState->Get(DefaultBattleBusOffset) = OverrideBattleBusSkin;
|
||||
|
||||
static auto FortAthenaAircraftClass = FindObject<UClass>("/Script/FortniteGame.FortAthenaAircraft");
|
||||
auto AllAircrafts = UGameplayStatics::GetAllActorsOfClass(GetWorld(), FortAthenaAircraftClass);
|
||||
|
||||
for (int i = 0; i < AllAircrafts.Num(); i++)
|
||||
{
|
||||
auto Aircraft = AllAircrafts.at(i);
|
||||
|
||||
static auto DefaultBusSkinOffset = Aircraft->GetOffset("DefaultBusSkin");
|
||||
Aircraft->Get(DefaultBusSkinOffset) = OverrideBattleBusSkin;
|
||||
|
||||
static auto SpawnedCosmeticActorOffset = Aircraft->GetOffset("SpawnedCosmeticActor");
|
||||
auto SpawnedCosmeticActor = Aircraft->Get<AActor*>(SpawnedCosmeticActorOffset);
|
||||
|
||||
if (SpawnedCosmeticActor)
|
||||
{
|
||||
static auto ActiveSkinOffset = SpawnedCosmeticActor->GetOffset("ActiveSkin");
|
||||
SpawnedCosmeticActor->Get(ActiveSkinOffset) = OverrideBattleBusSkin;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GameState->Get<float>("WarmupCountdownEndTime") = UGameplayStatics::GetTimeSeconds(GetWorld()) + 10;
|
||||
GameState->Get<float>("WarmupCountdownEndTime") = UGameplayStatics::GetTimeSeconds(GetWorld()) + 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -571,6 +581,25 @@ void MainUI()
|
||||
{
|
||||
StartEvent();
|
||||
}
|
||||
|
||||
if (Fortnite_Version == 8.51)
|
||||
{
|
||||
if (ImGui::Button("Unvault DrumGun"))
|
||||
{
|
||||
static auto SetUnvaultItemNameFn = FindObject<UFunction>("/Game/Athena/Prototype/Blueprints/White/BP_SnowScripting.BP_SnowScripting_C.SetUnvaultItemName");
|
||||
auto EventScripting = GetEventScripting();
|
||||
|
||||
if (EventScripting)
|
||||
{
|
||||
|
||||
FName Name = UKismetStringLibrary::Conv_StringToName(L"DrumGun");
|
||||
EventScripting->ProcessEvent(SetUnvaultItemNameFn, &Name);
|
||||
|
||||
static auto PillarsConcludedFn = FindObject<UFunction>("/Game/Athena/Prototype/Blueprints/White/BP_SnowScripting.BP_SnowScripting_C.PillarsConcluded");
|
||||
EventScripting->ProcessEvent(PillarsConcludedFn, &Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (Tab == DUMP_TAB)
|
||||
@@ -714,7 +743,9 @@ void PregameUI()
|
||||
ImGui::Checkbox("Creative", &Globals::bCreative);
|
||||
}
|
||||
|
||||
ImGui::Checkbox("Lategame", &Globals::bLateGame);
|
||||
bool bWillBeLategame = Globals::bLateGame.load();
|
||||
ImGui::Checkbox("Lategame", &bWillBeLategame);
|
||||
Globals::bLateGame.store(bWillBeLategame);
|
||||
|
||||
if (HasEvent())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user