Fixes heartbeat sounds playing indefinitely in certain cases
This commit is contained in:
@@ -249,6 +249,7 @@ Works together with spawning an observer, noted above.
|
||||
/mob/proc/ghostize(can_reenter_corpse = 1)
|
||||
if(key)
|
||||
if(!cmptext(copytext(key,1,2),"@")) // Skip aghosts.
|
||||
stop_sound_channel(CHANNEL_HEARTBEAT) //Stop heartbeat sounds because You Are A Ghost Now
|
||||
var/mob/dead/observer/ghost = new(src) // Transfer safety to observer spawning proc.
|
||||
SStgui.on_transfer(src, ghost) // Transfer NanoUIs.
|
||||
ghost.can_reenter_corpse = can_reenter_corpse
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
/mob/living/carbon/human/death(gibbed)
|
||||
if(stat == DEAD)
|
||||
return
|
||||
stop_sound_channel(CHANNEL_HEARTBEAT)
|
||||
var/obj/item/organ/heart/H = getorganslot("heart")
|
||||
if(H)
|
||||
H.beat = BEAT_NONE
|
||||
|
||||
. = ..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user