mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
init bosses
This commit is contained in:
@@ -1,10 +1,22 @@
|
||||
#include "FortServerBotManagerAthena.h"
|
||||
#include "bots.h"
|
||||
#include "ai.h"
|
||||
#include "finder.h"
|
||||
|
||||
AFortPlayerPawnAthena* UFortServerBotManagerAthena::SpawnBotHook(UFortServerBotManagerAthena* BotManager, FVector& InSpawnLocation, FRotator& InSpawnRotation,
|
||||
UFortAthenaAIBotCustomizationData* InBotData, FFortAthenaAIBotRunTimeCustomizationData* InRuntimeBotData)
|
||||
UFortAthenaAIBotCustomizationData* InBotData, FFortAthenaAIBotRunTimeCustomizationData& InRuntimeBotData)
|
||||
{
|
||||
LOG_INFO(LogBots, "SpawnBotHook!");
|
||||
|
||||
return nullptr;
|
||||
if (__int64(_ReturnAddress()) == SpawnBotRet()) {
|
||||
return SpawnBotOriginal(BotManager, InSpawnLocation, InSpawnRotation, InBotData, InRuntimeBotData);
|
||||
}
|
||||
|
||||
AActor* SpawnLocator = GetWorld()->SpawnActor<APawn>(APawn::StaticClass(), InSpawnLocation, InSpawnRotation.Quaternion());
|
||||
auto PawnClass = InBotData->Get<UClass*>(InBotData->GetOffset("PawnClass"));
|
||||
auto Pawn = BotMutator->SpawnBot(PawnClass , SpawnLocator, InSpawnLocation, InSpawnRotation, true);
|
||||
|
||||
Pawn->TeleportTo(InSpawnLocation, InSpawnRotation);//idfk????
|
||||
|
||||
return Pawn;
|
||||
}
|
||||
Reference in New Issue
Block a user