From 94fc3f01542e5d48c00782e6894792b6efbc29df Mon Sep 17 00:00:00 2001 From: GDN <96800819+GDNgit@users.noreply.github.com> Date: Sun, 5 Mar 2023 09:56:37 -0600 Subject: [PATCH] actually makes new players fully GC (#20525) --- code/modules/mob/new_player/new_player.dm | 6 +++++- code/modules/mob/new_player/new_player_logout.dm | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 20171ac7623..fa711c9d5e7 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -18,6 +18,11 @@ GLOB.mob_list += src return INITIALIZE_HINT_NORMAL +/mob/new_player/Destroy() + if(mind) + mind.current = null // We best null their mind as well, otherwise /every/ single new player is going to explode the server a little more going in/out of the round + return ..() + /mob/new_player/verb/new_player_panel() set src = usr @@ -198,7 +203,6 @@ observer.name = observer.real_name observer.key = key observer.add_to_respawnable_list() - mind.current = null qdel(src) return TRUE return FALSE diff --git a/code/modules/mob/new_player/new_player_logout.dm b/code/modules/mob/new_player/new_player_logout.dm index 07b27545027..307cd6ab557 100644 --- a/code/modules/mob/new_player/new_player_logout.dm +++ b/code/modules/mob/new_player/new_player_logout.dm @@ -2,7 +2,6 @@ ready = FALSE ..() if(!spawning)//Here so that if they are spawning and log out, the other procs can play out and they will have a mob to come back to. - mind.current = null // We best null their mind as well, otherwise /every/ single new player is going to explode the server a little more by logging out key = null//We null their key before deleting the mob, so they are properly kicked out. qdel(src) return