Add MVP ambient biome audio hook
This commit is contained in:
@@ -83,7 +83,9 @@ void AAgrarianWeatherAudioController::RefreshWeatherAudio(float DeltaSeconds)
|
||||
break;
|
||||
}
|
||||
|
||||
const float TargetAmbientVolume = GameState->IsNight() ? AmbientNightVolume : AmbientDayVolume;
|
||||
const float DayAmbient = FMath::Max(AmbientDayVolume, BiomeAmbientDayVolume);
|
||||
const float NightAmbient = FMath::Max(AmbientNightVolume, BiomeAmbientNightVolume);
|
||||
const float TargetAmbientVolume = GameState->IsNight() ? NightAmbient : DayAmbient;
|
||||
const float InterpSpeed = FMath::Max(0.1f, VolumeInterpSpeed);
|
||||
CurrentAmbientVolume = FMath::FInterpTo(CurrentAmbientVolume, TargetAmbientVolume, DeltaSeconds, InterpSpeed);
|
||||
CurrentRainVolume = FMath::FInterpTo(CurrentRainVolume, TargetRainVolume, DeltaSeconds, InterpSpeed);
|
||||
@@ -106,7 +108,11 @@ void AAgrarianWeatherAudioController::RefreshWeatherAudio(float DeltaSeconds)
|
||||
|
||||
void AAgrarianWeatherAudioController::AssignConfiguredSounds()
|
||||
{
|
||||
if (AmbientAudio && ClearAmbientSound)
|
||||
if (AmbientAudio && BiomeAmbientLoopSound)
|
||||
{
|
||||
AmbientAudio->SetSound(BiomeAmbientLoopSound);
|
||||
}
|
||||
else if (AmbientAudio && ClearAmbientSound)
|
||||
{
|
||||
AmbientAudio->SetSound(ClearAmbientSound);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user