mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user