added commission tracker to HUD

This commit is contained in:
2026-06-07 20:14:03 +03:00
parent 61d5a57d8d
commit 96392cd451
43 changed files with 199 additions and 38 deletions
@@ -198,7 +198,7 @@ ENPCType UNPCDirectorSubsystem::PickWeightedClass() const
return ENPCType::None;
}
bool UNPCDirectorSubsystem::FindSpawnPoint(const FVector& Around, FVector& OutLocation) const
bool UNPCDirectorSubsystem::FindSpawnPoint(const FVector& Around, FVector& OutLocation)
{
UNavigationSystemV1* NavSys = UNavigationSystemV1::GetCurrent(GetWorld());
const UNPCDirectorConfig* Config = GetConfig();
@@ -214,7 +214,9 @@ bool UNPCDirectorSubsystem::FindSpawnPoint(const FVector& Around, FVector& OutLo
if (NavSys->GetRandomReachablePointInRadius(Around, Config->SpawnRadiusMax, NavLocation) &&
FVector::DistSquared(NavLocation.Location, Around) >= MinRadiusSq)
{
OutLocation = NavLocation.Location;
FVector SpawnLocation = NavLocation.Location;
CorrectSpawnLocation(SpawnLocation);
OutLocation = SpawnLocation;
return true;
}
}
@@ -227,6 +229,11 @@ TSubclassOf<ANPC> UNPCDirectorSubsystem::GetRandomNPCClass(TArray<TSubclassOf<AN
return InNPCClasses[RandomIndex];
}
void UNPCDirectorSubsystem::CorrectSpawnLocation(FVector& OutVector)
{
OutVector.Z += 50.0f;
}
APawn* UNPCDirectorSubsystem::GetPlayerPawn() const
{
return UGameplayStatics::GetPlayerPawn(GetWorld(), 0);