Skip to content

Commit

Permalink
ChaosMod/EffectSound3D: Only allow looping sounds with FollowEntity P…
Browse files Browse the repository at this point in the history
…layType
  • Loading branch information
pongo1231 committed Jan 18, 2025
1 parent 3e446c5 commit b0477e5
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 @@ -95,7 +95,8 @@ void EffectSound3D::OnRun()
ma_sound_set_rolloff(&sound.Handle, .1f);
ma_sound_set_pitch(&sound.Handle,
1.f + (!Hooks::GetTargetAudioPitch() ? 0.f : Hooks::GetTargetAudioPitch() * .0001f));
ma_sound_set_looping(&sound.Handle, sound.PlayOptions.PlayFlags & EffectSoundPlayFlags_Looping);
ma_sound_set_looping(&sound.Handle, sound.PlayOptions.PlayType == EffectSoundPlayType::FollowEntity
&& sound.PlayOptions.PlayFlags & EffectSoundPlayFlags_Looping);

switch (sound.PlayOptions.PlayType)
{
Expand Down

0 comments on commit b0477e5

Please sign in to comment.