From b93781eb7179348b54747b8dd63d2b7747f2911a Mon Sep 17 00:00:00 2001 From: AnturK Date: Mon, 3 Feb 2020 04:59:07 +0100 Subject: [PATCH] Fix /client/Del to call Destroy (#49096) Weird side-effects here we go. Moved the removal to the top because that's pretty much most important thing here. --- code/modules/client/client_procs.dm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 04f9e9f4c3c..f153623ad24 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -453,9 +453,17 @@ GLOBAL_LIST_EMPTY(external_rsc_urls) ////////////// /client/Del() + if(!gc_destroyed) + Destroy() //Clean up signals and timers. + return ..() + +/client/Destroy() + GLOB.clients -= src + GLOB.directory -= ckey + log_access("Logout: [key_name(src)]") + GLOB.ahelp_tickets.ClientLogout(src) if(credits) QDEL_LIST(credits) - log_access("Logout: [key_name(src)]") if(holder) adminGreet(1) holder.owner = null @@ -477,18 +485,11 @@ GLOBAL_LIST_EMPTY(external_rsc_urls) ) send2tgs("Server", "[cheesy_message] (No admins online)") - - GLOB.ahelp_tickets.ClientLogout(src) - GLOB.directory -= ckey - GLOB.clients -= src QDEL_LIST_ASSOC_VAL(char_render_holders) if(movingmob != null) movingmob.client_mobs_in_contents -= mob UNSETEMPTY(movingmob.client_mobs_in_contents) Master.UpdateTickRate() - return ..() - -/client/Destroy() . = ..() //Even though we're going to be hard deleted there are still some things that want to know the destroy is happening return QDEL_HINT_HARDDEL_NOW