diff --git a/code/modules/mob/dead/observer/logout.dm b/code/modules/mob/dead/observer/logout.dm index 74d8976c4d8..c7ac27409ac 100644 --- a/code/modules/mob/dead/observer/logout.dm +++ b/code/modules/mob/dead/observer/logout.dm @@ -2,7 +2,7 @@ update_z(null) if (client) client.images -= (GLOB.ghost_images_default+GLOB.ghost_images_simple) - client.tgui_panel?.clear_dead_popup() + //client.tgui_panel?.clear_dead_popup() - NSV13 - commented out because this is a bad place to do that and also client is commonly already gone when this proc is called. if(observetarget) if(ismob(observetarget)) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 953c828e419..160ecc5c4bc 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -571,6 +571,10 @@ for(var/S in mind.spell_list) var/obj/effect/proc_holder/spell/spell = S spell.updateButtonIcon() + //NSV13 - clear that popup. + if(client) + client.tgui_panel?.clear_dead_popup() + //NSV13 end. /mob/living/proc/remove_CC(should_update_mobility = TRUE) SetStun(0, FALSE) diff --git a/code/modules/mob/living/login.dm b/code/modules/mob/living/login.dm index c8f1f02c6bc..526ae5579a2 100644 --- a/code/modules/mob/living/login.dm +++ b/code/modules/mob/living/login.dm @@ -30,3 +30,7 @@ var/datum/antagonist/hivemind/hivemind = mind.has_antag_datum(/datum/antagonist/hivemind) if(hivemind) hivemind.regain_images() + //NSV13 - clear the dead alert. + if(stat != DEAD) + client?.tgui_panel?.clear_dead_popup() + //NSV13 end. diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index d57c5e848ca..dc14e5afb96 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -899,7 +899,11 @@ ///Force get the ghost from the mind /mob/proc/grab_ghost(force) if(mind) - return mind.grab_ghost(force = force) + //NSV13 - clear dead popup if alive. + . = mind.grab_ghost(force = force) + if(stat != DEAD && client) + client.tgui_panel?.clear_dead_popup() + //NSV13 end ///Notify a ghost that it's body is being cloned /mob/proc/notify_ghost_cloning(var/message = "Someone is trying to revive you. Re-enter your corpse if you want to be revived!", var/sound = 'sound/effects/genetics.ogg', var/atom/source = null, flashwindow)