Fix embarrassment gain/decay not tied to NPC observation state
This commit is contained in:
@@ -24,7 +24,22 @@ void UStatsManager::TickComponent(float DeltaTime, enum ELevelTick TickType,
|
||||
FActorComponentTickFunction* ThisTickFunction)
|
||||
{
|
||||
DecreaseEnergy(0.9f);
|
||||
DecreaseEmbarrassment(1.0f);
|
||||
|
||||
if (ObserverCount > 0)
|
||||
{
|
||||
// TODO (#05): replace 0.0f with ClothingManager->GetEffectiveCoverage() when that lands.
|
||||
constexpr float CoverageWeight = 0.0f;
|
||||
IncreaseEmbarrassment(EmbarrassmentGainRate * (1.0f - CoverageWeight) * DeltaTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
DecreaseEmbarrassment(EmbarrassmentDecayRate * DeltaTime);
|
||||
}
|
||||
}
|
||||
|
||||
void UStatsManager::SetObserved(const bool bObserved, const float CoverageWeight)
|
||||
{
|
||||
ObserverCount = FMath::Max(0, bObserved ? ObserverCount + 1 : ObserverCount - 1);
|
||||
}
|
||||
|
||||
void UStatsManager::IncreaseEmbarrassment(const float Amount)
|
||||
|
||||
Reference in New Issue
Block a user