Skip to content

Commit

Permalink
Fix wind sounds not playing properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
alcatrazEscapee committed Jun 12, 2022
1 parent 324d201 commit c877171
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ private void addExtraSnowParticlesAndSounds(Camera camera, CallbackInfo ci)
// In a windy location, play wind sounds
float volumeModifier = 0.2f + (light - 3) * 0.01f;
float pitchModifier = 0.7f;
if (camera.getFluidInCamera() == FogType.NONE)
if (camera.getFluidInCamera() != FogType.NONE)
{
pitchModifier = 0.3f;
}
windSoundTime = 20 * 3 + random.nextInt(30);
level.playLocalSound(playerPos, PrimalWinterAmbience.WIND.get(), SoundSource.WEATHER, volumeModifier, pitchModifier, true);
level.playLocalSound(playerPos, PrimalWinterAmbience.WIND.get(), SoundSource.WEATHER, volumeModifier, pitchModifier, false);
}
else
{
Expand Down

0 comments on commit c877171

Please sign in to comment.