abundant update

complete looting rewrite, improve combining pickups, add debug printing logs, fix some agids, fix cheat summon, fix issue with vehicle spawning.
This commit is contained in:
Milxnor
2023-05-06 19:01:56 -04:00
parent a4ed589aab
commit 5e92f2e90b
31 changed files with 1113 additions and 201 deletions

View File

@@ -490,7 +490,7 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
return;
}
auto Pawn = ReceivingController->GetMyFortPawn();
auto Pawn = ReceivingController->GetPawn();
if (!Pawn)
{
@@ -519,11 +519,25 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
if (ClassObj)
{
int AmountSpawned = 0;
for (int i = 0; i < Count; i++)
{
FActorSpawnParameters SpawnParameters{};
// SpawnParameters.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AdjustIfPossibleButAlwaysSpawn;
auto Loc = Pawn->GetActorLocation();
// Loc.Z += 1000;
GetWorld()->SpawnActor<AActor>(ClassObj, Loc, FQuat());
Loc.Z += 1000;
auto NewActor = GetWorld()->SpawnActor<AActor>(ClassObj, Loc, FQuat(), FVector(1, 1, 1), SpawnParameters);
if (!NewActor)
{
SendMessageToConsole(PlayerController, L"Failed to spawn an actor!");
}
else
{
AmountSpawned++;
}
}
SendMessageToConsole(PlayerController, L"Summoned!");