Skip to content

Commit

Permalink
Merge pull request #242 from project-fika/firing-death-fix
Browse files Browse the repository at this point in the history
Change code for audio on player death
Lacyway authored Dec 18, 2024
2 parents 5cbf783 + 1f67ab1 commit afe616a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -246,12 +246,13 @@ public override void IEventsConsumerOnShellEject()

private IEnumerator BreakFiringLoop()
{
WeaponSoundPlayer.Release();
Traverse<bool> isFiring = Traverse.Create(WeaponSoundPlayer).Field<bool>("_isFiring");
int attempts = 0;
while (isFiring.Value && attempts < 10)
{
yield return new WaitForEndOfFrame();
WeaponSoundPlayer.OnBreakLoop();
WeaponSoundPlayer.StopFiringLoop();
attempts++;
}
}

0 comments on commit afe616a

Please sign in to comment.