fix 3.0, 3.1, 3.2, and add cube spawning event, mybe fix s19 crash?

This commit is contained in:
Milxnor
2023-04-26 21:44:16 -04:00
parent 93d18a3fe9
commit be0873d5d7
12 changed files with 166 additions and 20 deletions

View File

@@ -160,7 +160,10 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
}
else
{
GameState->Get("CurrentPlaylistData") = Playlist;
static auto CurrentPlaylistDataOffset = GameState->GetOffset("CurrentPlaylistData", false);
if (CurrentPlaylistDataOffset != -1)
GameState->Get(CurrentPlaylistDataOffset) = Playlist;
}
if (bOnRep)
@@ -553,6 +556,22 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
// return false;
static auto NewFn = FindObject<UFunction>("/Game/Athena/Prototype/Blueprints/Cube/CUBE.CUBE_C.New");
if (NewFn && (Fortnite_Version == 5.30 ? !Globals::bGoingToPlayEvent : true))
{
auto Loader = GetEventLoader("/Game/Athena/Prototype/Blueprints/Cube/CUBE.CUBE_C");
LOG_INFO(LogDev, "Loader: {}", __int64(Loader));
if (Loader)
{
int32 NewParam = 1;
// Loader->ProcessEvent(NextFn, &NewParam);
Loader->ProcessEvent(NewFn, &NewParam);
}
}
LoopMutators([&](AFortAthenaMutator* Mutator) { LOG_INFO(LogGame, "Mutator {}", Mutator->GetPathName()); });
Globals::AmountOfListens++;