diff --git a/code/datums/mind.dm b/code/datums/mind.dm index ed95351ecd8..2cccda719c1 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -1766,7 +1766,7 @@ /datum/mind/proc/check_ghost_client() var/mob/dead/observer/G = get_ghost() - if(G.client) + if(G?.client) return TRUE /datum/mind/proc/grab_ghost(force) diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index cc96cb02de2..eb33c75e0a6 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -206,7 +206,7 @@ if(stat == DEAD || HAS_TRAIT(src, TRAIT_FAKEDEATH)) var/revivable_state = "dead" if(ghost_can_reenter()) // Not DNR or AntagHUD - if((ismachineperson(src) && client) || (!ismachineperson(src) && timeofdeath && is_revivable())) + if((ismachineperson(src) && (client || check_ghost_client())) || (!ismachineperson(src) && timeofdeath && is_revivable())) revivable_state = "flatline" else if(get_ghost() || key) revivable_state = "hassoul" diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm index 4a467dcaaae..bc202bda8a6 100644 --- a/code/modules/mob/living/carbon/examine.dm +++ b/code/modules/mob/living/carbon/examine.dm @@ -253,10 +253,10 @@ msg += "[p_they(TRUE)] appear[p_s()] to have committed suicide... there is no hope of recovery.\n" if(!just_sleeping) msg += "[p_they(TRUE)] [p_are()] limp and unresponsive" - if(get_int_organ(/obj/item/organ/internal/brain) && !key) - if(!check_ghost_client()) + if(get_int_organ(/obj/item/organ/internal/brain) && !client) // body has no online player inside - let's look for ghost + if(!check_ghost_client()) // our ghost is offline or no ghost attached to body msg += "; there are no signs of life" - if(!get_ghost()) + if(!get_ghost() && !key) // no ghost attached to body msg += " and [p_their()] soul has departed" msg += "...\n"