From 96323dc13bbb0cab0e50f60deb0108457f70934d Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Sun, 30 Apr 2017 16:40:31 -0400 Subject: [PATCH] Screen GC Issues (#7200) --- code/_onclick/hud/alert.dm | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 0090dd654fd..68a24f87a3e 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -339,6 +339,10 @@ so as to remain in compliance with the most up-to-date laws." timeout = 600 var/atom/target = null +/obj/screen/alert/hackingapc/Destroy() + target = null + return ..() + /obj/screen/alert/hackingapc/Click() if(!usr || !usr.client) return @@ -366,7 +370,8 @@ so as to remain in compliance with the most up-to-date laws." timeout = 300 /obj/screen/alert/notify_cloning/Click() - if(!usr || !usr.client) return + if(!usr || !usr.client) + return var/mob/dead/observer/G = usr G.reenter_corpse() @@ -378,11 +383,18 @@ so as to remain in compliance with the most up-to-date laws." var/atom/target = null var/action = NOTIFY_JUMP +/obj/screen/alert/notify_action/Destroy() + target = null + return ..() + /obj/screen/alert/notify_action/Click() - if(!usr || !usr.client) return - if(!target) return + if(!usr || !usr.client) + return + if(!target) + return var/mob/dead/observer/G = usr - if(!istype(G)) return + if(!istype(G)) + return switch(action) if(NOTIFY_ATTACK) target.attack_ghost(G)