mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 10:52:22 +01:00
Get the LocationToSpawnLoot values from LootSpawnLocation_Athena
This commit is contained in:
@@ -105,6 +105,15 @@ FVector AActor::GetActorLocation()
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FVector AActor::GetActorForwardVector()
|
||||||
|
{
|
||||||
|
static auto GetActorForwardVectorFn = FindObject<UFunction>("/Script/Engine.Actor.GetActorForwardVector");
|
||||||
|
FVector ret;
|
||||||
|
this->ProcessEvent(GetActorForwardVectorFn, &ret);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
FVector AActor::GetActorRightVector()
|
FVector AActor::GetActorRightVector()
|
||||||
{
|
{
|
||||||
static auto GetActorRightVectorFn = FindObject<UFunction>("/Script/Engine.Actor.GetActorRightVector");
|
static auto GetActorRightVectorFn = FindObject<UFunction>("/Script/Engine.Actor.GetActorRightVector");
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ public:
|
|||||||
AActor* GetOwner();
|
AActor* GetOwner();
|
||||||
struct FVector GetActorScale3D();
|
struct FVector GetActorScale3D();
|
||||||
struct FVector GetActorLocation();
|
struct FVector GetActorLocation();
|
||||||
|
struct FVector GetActorForwardVector();
|
||||||
struct FVector GetActorRightVector();
|
struct FVector GetActorRightVector();
|
||||||
struct FVector GetActorUpVector();
|
struct FVector GetActorUpVector();
|
||||||
void K2_DestroyActor();
|
void K2_DestroyActor();
|
||||||
|
|||||||
@@ -7,7 +7,12 @@
|
|||||||
bool ABuildingContainer::SpawnLoot(AFortPawn* Pawn)
|
bool ABuildingContainer::SpawnLoot(AFortPawn* Pawn)
|
||||||
{
|
{
|
||||||
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
|
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
|
||||||
FVector LocationToSpawnLoot = this->GetActorLocation() + this->GetActorRightVector() * 70.f + this->GetActorUpVector() * 50.f;
|
|
||||||
|
static auto LootSpawnLocationOffset = this->GetOffset("LootSpawnLocation_Athena");
|
||||||
|
|
||||||
|
auto LSL = this->Get<FVector>(LootSpawnLocationOffset);
|
||||||
|
|
||||||
|
FVector LocationToSpawnLoot = this->GetActorLocation() + this->GetActorForwardVector() * LSL.X + this->GetActorRightVector() * LSL.Y + this->GetActorUpVector() * LSL.Z;
|
||||||
|
|
||||||
static auto SearchLootTierGroupOffset = this->GetOffset("SearchLootTierGroup");
|
static auto SearchLootTierGroupOffset = this->GetOffset("SearchLootTierGroup");
|
||||||
auto RedirectedLootTier = GameMode->RedirectLootTier(this->Get<FName>(SearchLootTierGroupOffset));
|
auto RedirectedLootTier = GameMode->RedirectLootTier(this->Get<FName>(SearchLootTierGroupOffset));
|
||||||
|
|||||||
Reference in New Issue
Block a user