From 26d277615b0a9d92e16c78ea6c733fca661d8615 Mon Sep 17 00:00:00 2001 From: Lacyway <20912169+Lacyway@users.noreply.github.com> Date: Mon, 14 Oct 2024 11:14:02 +0200 Subject: [PATCH] Update hasFired --- .../CoopObservedFirearmController.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Fika.Core/Coop/ObservedClasses/HandsControllers/CoopObservedFirearmController.cs b/Fika.Core/Coop/ObservedClasses/HandsControllers/CoopObservedFirearmController.cs index 0093a840..cdc722e0 100644 --- a/Fika.Core/Coop/ObservedClasses/HandsControllers/CoopObservedFirearmController.cs +++ b/Fika.Core/Coop/ObservedClasses/HandsControllers/CoopObservedFirearmController.cs @@ -113,19 +113,19 @@ public static CoopObservedFirearmController Create(CoopPlayer player, Weapon wea public override void ManualUpdate(float deltaTime) { base.ManualUpdate(deltaTime); - lastFireTime += deltaTime; - if (lastFireTime > 0.05f) + if (hasFired) { - if (hasFired) + lastFireTime += deltaTime; + if (lastFireTime > 0.05f) { FirearmsAnimator.SetFire(false); hasFired = false; - } - if (needsReset) - { - needsReset = false; - WeaponSoundPlayer.OnBreakLoop(); - } + if (needsReset) + { + needsReset = false; + WeaponSoundPlayer.OnBreakLoop(); + } + } } }