Fix: No more beating sounds from dead hearts (#30871)

* Automatic changelog generation for PR #30056 [ci skip]

* Delete AutoChangeLog-pr-30056.yml

* Removes beating from nonbeating hearts

* single check
This commit is contained in:
Robustin
2017-09-20 11:58:16 -04:00
committed by CitadelStationBot
parent bb837fe20e
commit e9534fb156
+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)