This commit is contained in:
Gray
2024-03-20 19:11:16 -04:00
committed by GitHub
parent 138d3cc668
commit a69d1bda6e

View File

@@ -113,8 +113,19 @@ static inline AFortAthenaMutator_Bots* SpawnBotMutator() //sets up all the class
static auto BGAClass = FindObject<UClass>(L"/Script/Engine.BlueprintGeneratedClass"); 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); 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); 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"); static auto CachedGameModeOffset = BotMutator->GetOffset("CachedGameMode");
BotMutator->Get(CachedGameModeOffset) = GameMode; BotMutator->Get(CachedGameModeOffset) = GameMode;