From 53c9c16fe38c4c78a3f5646133dbf39f38b00ddd Mon Sep 17 00:00:00 2001 From: vuonojenmustaturska Date: Sun, 29 Oct 2017 14:14:16 +0200 Subject: [PATCH 1/2] one more thing to allow more mobs to qdel nicely (#32168) --- code/_onclick/hud/alert.dm | 3 ++- code/modules/mob/mob.dm | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 4703300f11..cd812d10a7 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -15,7 +15,7 @@ Override makes it so the alert is not replaced until cleared by a clear_alert with clear_override, and it's used for hallucinations. */ - if(!category) + if(!category || QDELETED(src)) return var/obj/screen/alert/thealert @@ -629,4 +629,5 @@ so as to remain in compliance with the most up-to-date laws." . = ..() severity = 0 master = null + mob_viewer = null screen_loc = "" diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index ddd1d3e2dc..43f7724af5 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -4,6 +4,8 @@ GLOB.living_mob_list -= src GLOB.all_clockwork_mobs -= src GLOB.mob_directory -= tag + for (var/alert in alerts) + clear_alert(alert, TRUE) if(observers && observers.len) for(var/M in observers) var/mob/dead/observe = M