Use LootSpawnLocation_Athena in floorloot too

This commit is contained in:
PRO100KatYT
2023-05-21 20:46:18 +02:00
parent d6db4826c6
commit 530cef2d8b

View File

@@ -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<FVector>(LootSpawnLocationOffset);
auto Location = CurrentActor->GetActorLocation() + CurrentActor->GetActorForwardVector() * LSL.X + CurrentActor->GetActorRightVector() * LSL.Y + CurrentActor->GetActorUpVector() * LSL.Z;
std::vector<LootDrop> 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<FVector>(LootSpawnLocationOffset);
auto Location = CurrentActor->GetActorLocation() + CurrentActor->GetActorForwardVector() * LSL.X + CurrentActor->GetActorRightVector() * LSL.Y + CurrentActor->GetActorUpVector() * LSL.Z;
std::vector<LootDrop> LootDrops = PickLootDrops(BRIslandTierGroup, -1, bPrint);