From 1f67ab166e0f86c12fb9f65b991f60c9d93e7aa1 Mon Sep 17 00:00:00 2001 From: Lacyway <20912169+Lacyway@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:23:35 +0100 Subject: [PATCH] Change code for audio on player death --- .../HandsControllers/CoopObservedFirearmController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Fika.Core/Coop/ObservedClasses/HandsControllers/CoopObservedFirearmController.cs b/Fika.Core/Coop/ObservedClasses/HandsControllers/CoopObservedFirearmController.cs index de04afd1..2f983d63 100644 --- a/Fika.Core/Coop/ObservedClasses/HandsControllers/CoopObservedFirearmController.cs +++ b/Fika.Core/Coop/ObservedClasses/HandsControllers/CoopObservedFirearmController.cs @@ -246,12 +246,13 @@ public override void IEventsConsumerOnShellEject() private IEnumerator BreakFiringLoop() { + WeaponSoundPlayer.Release(); Traverse isFiring = Traverse.Create(WeaponSoundPlayer).Field("_isFiring"); int attempts = 0; while (isFiring.Value && attempts < 10) { yield return new WaitForEndOfFrame(); - WeaponSoundPlayer.OnBreakLoop(); + WeaponSoundPlayer.StopFiringLoop(); attempts++; } }