Dude 💀

This commit is contained in:
Gray
2024-03-20 21:45:38 -04:00
parent 138d3cc668
commit b3d9ab9e8b
46 changed files with 2846 additions and 1608 deletions

View File

@@ -110,11 +110,29 @@ static inline AFortAthenaMutator_Bots* SpawnBotMutator() //sets up all the class
auto GameState = Cast<AFortGameStateAthena>(GetWorld()->GetGameState());
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
auto MutatorBotsClass = FindObject<UClass>("/Script/FortniteGame.FortAthenaMutator_Bots");
if (!MutatorBotsClass)
{
return nullptr;
}
static auto BGAClass = FindObject<UClass>(L"/Script/Engine.BlueprintGeneratedClass");
static auto PhoebeMutatorClass = LoadObject<UClass>(L"/Game/Athena/AI/Phoebe/BP_Phoebe_Mutator.BP_Phoebe_Mutator_C", BGAClass);
if (!PhoebeMutatorClass)
{
return nullptr;
}
auto BotMutator = GetWorld()->SpawnActor<AFortAthenaMutator_Bots>(PhoebeMutatorClass);
if (!BotMutator)
{
LOG_WARN(LogAI, "Failed to spawn Bot Mutator!");
return nullptr;
}
static auto CachedGameModeOffset = BotMutator->GetOffset("CachedGameMode");
BotMutator->Get(CachedGameModeOffset) = GameMode;