From 530cef2d8ba618fc674d132e25444fe21bcb84b5 Mon Sep 17 00:00:00 2001 From: PRO100KatYT <67335438+PRO100KatYT@users.noreply.github.com> Date: Sun, 21 May 2023 20:46:18 +0200 Subject: [PATCH] Use LootSpawnLocation_Athena in floorloot too --- Project Reboot 3.0/FortGameModeAthena.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Project Reboot 3.0/FortGameModeAthena.cpp b/Project Reboot 3.0/FortGameModeAthena.cpp index cda3355..5fbebe8 100644 --- a/Project Reboot 3.0/FortGameModeAthena.cpp +++ b/Project Reboot 3.0/FortGameModeAthena.cpp @@ -1117,8 +1117,6 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena auto SpawnIslandTierGroup = UKismetStringLibrary::Conv_StringToName(L"Loot_AthenaFloorLoot_Warmup"); auto BRIslandTierGroup = UKismetStringLibrary::Conv_StringToName(L"Loot_AthenaFloorLoot"); - float UpZ = 50; - uint8 SpawnFlag = EFortPickupSourceTypeFlag::GetContainerValue(); bool bTest = false; @@ -1127,8 +1125,9 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena for (int i = 0; i < SpawnIsland_FloorLoot_Actors.Num(); i++) { ABuildingContainer* CurrentActor = (ABuildingContainer*)SpawnIsland_FloorLoot_Actors.at(i); - auto Location = CurrentActor->GetActorLocation(); - Location.Z += UpZ; + static auto LootSpawnLocationOffset = CurrentActor->GetOffset("LootSpawnLocation_Athena"); + auto LSL = CurrentActor->Get(LootSpawnLocationOffset); + auto Location = CurrentActor->GetActorLocation() + CurrentActor->GetActorForwardVector() * LSL.X + CurrentActor->GetActorRightVector() * LSL.Y + CurrentActor->GetActorUpVector() * LSL.Z; std::vector LootDrops = PickLootDrops(SpawnIslandTierGroup, -1, bPrintWarmup); @@ -1157,8 +1156,9 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena { ABuildingContainer* CurrentActor = (ABuildingContainer*)BRIsland_FloorLoot_Actors.at(i); spawned++; - auto Location = CurrentActor->GetActorLocation(); - Location.Z += UpZ; + static auto LootSpawnLocationOffset = CurrentActor->GetOffset("LootSpawnLocation_Athena"); + auto LSL = CurrentActor->Get(LootSpawnLocationOffset); + auto Location = CurrentActor->GetActorLocation() + CurrentActor->GetActorForwardVector() * LSL.X + CurrentActor->GetActorRightVector() * LSL.Y + CurrentActor->GetActorUpVector() * LSL.Z; std::vector LootDrops = PickLootDrops(BRIslandTierGroup, -1, bPrint);