mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 10:52:22 +01:00
big oops
This commit is contained in:
@@ -107,23 +107,34 @@ static bool SetNavigationSystem(AAthenaNavSystemConfigOverride* NavSystemOverrid
|
|||||||
|
|
||||||
static inline AFortAthenaMutator_Bots* SpawnBotMutator() //sets up all the classes for phoebe
|
static inline AFortAthenaMutator_Bots* SpawnBotMutator() //sets up all the classes for phoebe
|
||||||
{
|
{
|
||||||
auto GameState = Cast<AFortGameStateAthena>(GetWorld()->GetGameState());
|
auto GameState = Cast<AFortGameStateAthena>(GetWorld()->GetGameState());
|
||||||
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
|
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
auto BotMutator = GetWorld()->SpawnActor<AFortAthenaMutator_Bots>(PhoebeMutatorClass);
|
if (!PhoebeMutatorClass)
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
static auto CachedGameModeOffset = BotMutator->GetOffset("CachedGameMode");
|
auto BotMutator = GetWorld()->SpawnActor<AFortAthenaMutator_Bots>(PhoebeMutatorClass);
|
||||||
BotMutator->Get(CachedGameModeOffset) = GameMode;
|
|
||||||
|
|
||||||
static auto CachedGameStateOffset = BotMutator->GetOffset("CachedGameState", false);
|
if (!BotMutator)
|
||||||
|
{
|
||||||
|
LOG_WARN(LogAI, "Failed to spawn Bot Mutator!");
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
if (CachedGameStateOffset != -1)
|
static auto CachedGameModeOffset = BotMutator->GetOffset("CachedGameMode");
|
||||||
BotMutator->Get(CachedGameStateOffset) = GameState;
|
BotMutator->Get(CachedGameModeOffset) = GameMode;
|
||||||
|
|
||||||
return BotMutator;
|
static auto CachedGameStateOffset = BotMutator->GetOffset("CachedGameState", false);
|
||||||
|
|
||||||
|
if (CachedGameStateOffset != -1)
|
||||||
|
BotMutator->Get(CachedGameStateOffset) = GameState;
|
||||||
|
|
||||||
|
return BotMutator;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SetupServerBotManager()
|
static void SetupServerBotManager()
|
||||||
@@ -435,4 +446,4 @@ static AFortPlayerPawn* SpawnAIFromCustomizationData(const FVector& Location, UF
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Pawn;
|
return Pawn;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user