respawning on older versions

fixed respawning on pre s6, fixed a crash for some s5 builds, work on ai a bit, start on blueprint decompiler
This commit is contained in:
Milxnor
2023-05-20 10:22:47 -04:00
parent bb5a5620e8
commit 33433ea9de
30 changed files with 2082 additions and 77 deletions

View File

@@ -10,6 +10,7 @@
#include "FortLootPackage.h"
#include "bots.h"
#include "FortAthenaMutator_Bots.h"
#include "ai.h"
bool IsOperator(APlayerState* PlayerState, AFortPlayerController* PlayerController)
{
@@ -646,6 +647,43 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
SendMessageToConsole(PlayerController, L"Not a valid class!");
}
}
else if (Command == "spawnbottest")
{
// /Game/Athena/AI/MANG/BotData/
if (NumArgs < 1)
{
SendMessageToConsole(PlayerController, L"Please provide a customization object!");
return;
}
auto Pawn = ReceivingController->GetPawn();
if (!Pawn)
{
SendMessageToConsole(PlayerController, L"No pawn to spawn bot at!");
return;
}
auto CustomizationData = LoadObject<UFortAthenaAIBotCustomizationData>(Arguments[1], UFortAthenaAIBotCustomizationData::StaticClass());
if (!CustomizationData)
{
SendMessageToConsole(PlayerController, L"Invalid CustomizationData!");
return;
}
auto NewPawn = SpawnAIFromCustomizationData(Pawn->GetActorLocation(), CustomizationData);
if (NewPawn)
{
SendMessageToConsole(PlayerController, L"Spawned!");
}
else
{
SendMessageToConsole(PlayerController, L"Failed to spawn!");
}
}
else if (Command == "spawnbot")
{
auto Pawn = ReceivingController->GetPawn();