kismet function implemnetaitonm

This commit is contained in:
Milxnor
2023-03-12 22:11:16 -04:00
parent 32bcc705af
commit 2fd7f3b23f
16 changed files with 375 additions and 62 deletions

View File

@@ -164,7 +164,7 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
{
}
LOG_INFO(LogDev, "weaponName: {}", weaponName);
// LOG_INFO(LogDev, "weaponName: {}", weaponName);
auto WID = Cast<UFortWorldItemDefinition>(FindObject(weaponName, nullptr, ANY_PACKAGE));
@@ -182,5 +182,32 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
SendMessageToConsole(PlayerController, L"Granted item!");
}
else if (Command == "bugitgo")
{
if (Arguments.size() <= 3)
{
SendMessageToConsole(PlayerController, L"Please provide X, Y, and Z!\n");
return;
}
float X{}, Y{}, Z{};
try { X = std::stof(Arguments[1]); }
catch (...) {}
try { Y = std::stof(Arguments[2]); }
catch (...) {}
try { Z = std::stof(Arguments[3]); }
catch (...) {}
auto Pawn = Cast<APawn>(ReceivingController->GetPawn());
if (!Pawn)
{
SendMessageToConsole(PlayerController, L"No pawn to teleport!");
return;
}
Pawn->TeleportTo(FVector(X, Y, Z), Pawn->GetActorRotation());
}
}
}