[MIRROR] Fix heartbeat continuing for a while on revival [MDB IGNORE] (#25862)

* Fix heartbeat continuing for a while on revival (#80561)

## About The Pull Request

- If you are defibbed (into hard crit), your heartbeat will be
`BEAT_FAST`
- If you are healed fast enough from hard crit, such that you do not
life tick while in soft crit, you skip `BEAT_SLOW`
- If you skip `BEAT_SLOW`, it never stops the heartbeat

This PR fixes this issue by checking `if not in crit, and heartbeat
sound is playing -> stop sound`.

## Changelog

🆑 Melbert
fix: Fixed some occasions in which heartbeat SFX will continue on
revival for longer than expected
/🆑

* Fix heartbeat continuing for a while on revival

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-12-25 21:52:14 -05:00
committed by GitHub
co-authored by MrMelbert
parent b54ca5ce5b
commit e04066299c
@@ -119,7 +119,7 @@
SEND_SOUND(owner, sound('sound/health/fastbeat.ogg', repeat = TRUE, channel = CHANNEL_HEARTBEAT, volume = 40))
beat = BEAT_FAST
else if(beat == BEAT_SLOW)
else if(beat != BEAT_NONE)
owner.stop_sound_channel(CHANNEL_HEARTBEAT)
beat = BEAT_NONE