Skip to content

Commit

Permalink
Update hasFired
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed Oct 14, 2024
1 parent c201da6 commit 26d2776
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
}
}

Expand Down

0 comments on commit 26d2776

Please sign in to comment.