From e04066299c3a5ffd8916a88e5c3e5da3128c787e Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Tue, 26 Dec 2023 03:52:14 +0100 Subject: [PATCH] [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 :cl: Melbert fix: Fixed some occasions in which heartbeat SFX will continue on revival for longer than expected /:cl: * Fix heartbeat continuing for a while on revival --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> --- code/modules/surgery/organs/internal/heart/_heart.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/surgery/organs/internal/heart/_heart.dm b/code/modules/surgery/organs/internal/heart/_heart.dm index e2ca8725b9d..2773f588b24 100644 --- a/code/modules/surgery/organs/internal/heart/_heart.dm +++ b/code/modules/surgery/organs/internal/heart/_heart.dm @@ -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