Skip to content

Commit

Permalink
ChaosMod/EffectSound3D: Switch to linear attenuation
Browse files Browse the repository at this point in the history
  • Loading branch information
pongo1231 committed Jan 18, 2025
1 parent 4b3ca26 commit d013736
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ChaosMod/Components/EffectSound/EffectSound3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ void EffectSound3D::OnRun()
if (!ma_sound_is_playing(&sound.Handle))
ma_sound_start(&sound.Handle);

ma_sound_set_rolloff(&sound.Handle, .1f);
ma_sound_set_attenuation_model(&sound.Handle, ma_attenuation_model_linear);
ma_sound_set_max_distance(&sound.Handle, 125.f);
ma_sound_set_pitch(&sound.Handle,
1.f + (!Hooks::GetTargetAudioPitch() ? 0.f : Hooks::GetTargetAudioPitch() * .0001f));
ma_sound_set_looping(&sound.Handle, sound.PlayOptions.PlayType == EffectSoundPlayType::FollowEntity
Expand Down

0 comments on commit d013736

Please sign in to comment.