diff --git a/Fika.Core/Coop/Players/ObservedCoopPlayer.cs b/Fika.Core/Coop/Players/ObservedCoopPlayer.cs index b97a4053..24f846ff 100644 --- a/Fika.Core/Coop/Players/ObservedCoopPlayer.cs +++ b/Fika.Core/Coop/Players/ObservedCoopPlayer.cs @@ -871,7 +871,7 @@ public override void OnDead(EDamageType damageType) } } } - Singleton.Instance.ProtagonistHearingChanged -= UpdateStepSoundRolloff; + Singleton.Instance.ProtagonistHearingChanged -= UpdateSoundRolloff; base.OnDead(damageType); if (cullingHandler != null) { @@ -1271,7 +1271,18 @@ public override void ManualUpdate(float deltaTime, float? platformDeltaTime = nu public override void InitAudioController() { base.InitAudioController(); - Singleton.Instance.ProtagonistHearingChanged += UpdateStepSoundRolloff; + Singleton.Instance.ProtagonistHearingChanged += UpdateSoundRolloff; + } + + private void UpdateSoundRolloff() + { + UpdateStepSoundRolloff(); + UpdateVoiceSoundRolloff(); + } + + private void UpdateVoiceSoundRolloff() + { + SpeechSource?.SetRolloff(60f * ProtagonistHearing); } public override bool UpdateGrenadeAnimatorDuePoV() @@ -1301,7 +1312,7 @@ public override void OnDestroy() } if (Singleton.Instantiated) { - Singleton.Instance.ProtagonistHearingChanged -= UpdateStepSoundRolloff; + Singleton.Instance.ProtagonistHearingChanged -= UpdateSoundRolloff; } base.OnDestroy(); }