Merge pull request #2879 from Citadel-Station-13/upstream-merge-30871

[MIRROR] Fix: No more beating sounds from dead hearts
This commit is contained in:
LetterJay
2017-09-21 07:32:04 -04:00
committed by GitHub
+2 -2
View File
@@ -50,11 +50,11 @@
return S
/obj/item/organ/heart/on_life()
if(owner.client)
if(owner.client && beating)
var/sound/slowbeat = sound('sound/health/slowbeat.ogg', repeat = TRUE)
var/sound/fastbeat = sound('sound/health/fastbeat.ogg', repeat = TRUE)
var/mob/living/carbon/H = owner
if(H.health <= HEALTH_THRESHOLD_CRIT && beat != BEAT_SLOW)
beat = BEAT_SLOW
H.playsound_local(get_turf(H), slowbeat,40,0, channel = CHANNEL_HEARTBEAT)