mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-14 03:02:22 +01:00
Dude 💀
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user