Implemented Security Specialists Side Bounty Checkpoints

This commit is contained in:
Rafal Swierczek 2024-02-27 13:26:50 +00:00
parent b8ce592abd
commit 9bb0759f01
9 changed files with 19 additions and 29 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:630ee01109be0abb41a16067a671698e93bbe6f1564ed895beb087e84791806a oid sha256:d360b1563752a2e5c709ca96b49b918c85b9d6abfaf2389274b2eabc6ef46ea1
size 13946346 size 13946298

View File

@ -150,25 +150,6 @@ void ABountyHunterCharacter::EndPlay(const EEndPlayReason::Type EndPlayReason)
UEVGameInstance* GI = Cast<UEVGameInstance>(GetGameInstance()); UEVGameInstance* GI = Cast<UEVGameInstance>(GetGameInstance());
if (!IsValid(GI->MainSaveGameInstanceRef)) return; if (!IsValid(GI->MainSaveGameInstanceRef)) return;
GI->MainSaveGameInstanceRef->PlayerOpenWorldSpawnTransformSave = GetActorTransform(); GI->MainSaveGameInstanceRef->PlayerOpenWorldSpawnTransformSave = GetActorTransform();
// TArray<AActor*> LandingZones;
// ALandingZone* ClosestLandingZone = nullptr;
// double DistToClosestLandingZone;
// UGameplayStatics::GetAllActorsOfClass(GetWorld(), ALandingZone::StaticClass(), LandingZones);
// for (AActor* LZ_Actor : LandingZones)
// {
// ALandingZone* LZ = Cast<ALandingZone>(LZ_Actor);
// double DistToLZ = FVector::Dist(LZ->GetExitTransform().GetLocation(), GetActorLocation());
// if (!IsValid(ClosestLandingZone))
// {
// ClosestLandingZone = LZ;
// DistToClosestLandingZone = DistToLZ;
// continue;
// }
// ClosestLandingZone = DistToClosestLandingZone >= DistToLZ ? LZ : ClosestLandingZone;
// DistToClosestLandingZone = DistToClosestLandingZone >= DistToLZ ? DistToLZ : DistToClosestLandingZone;
// }
// if (!IsValid(ClosestLandingZone)) return;
// GI->MainSaveGameInstanceRef->PlayerOpenWorldSpawnTransformSave = ClosestLandingZone->GetExitTransform();
UGameplayStatics::SaveGameToSlot(GI->MainSaveGameInstanceRef, "MainSave", 0); UGameplayStatics::SaveGameToSlot(GI->MainSaveGameInstanceRef, "MainSave", 0);
} }