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.
This commit is contained in:
AnturK
2020-02-02 19:59:06 -08:00
committed by GitHub
parent 33e3622f27
commit b93781eb71
+9 -8
View File
@@ -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