From 72abb195bc0bd57b41f112392f8aa7d70567c42e Mon Sep 17 00:00:00 2001 From: Erki Date: Sun, 29 Dec 2019 23:51:03 +0200 Subject: [PATCH] Fix greeting window malfunction (#7847) * Fixes * Log the change * Remove unused var --- code/modules/client/client defines.dm | 4 +--- code/modules/client/client procs.dm | 6 +----- code/modules/mob/abstract/new_player/login.dm | 2 -- code/modules/mob/abstract/unauthed/login.dm | 11 +++++++---- code/modules/mob/login.dm | 2 -- html/changelogs/skull132_greeting-window.yml | 5 +++++ 6 files changed, 14 insertions(+), 16 deletions(-) create mode 100644 html/changelogs/skull132_greeting-window.yml diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm index 5c958af03d7..dfa4a0d8a81 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -73,6 +73,4 @@ var/obj/screen/plane_master/parallax_dustmaster/parallax_dustmaster = null var/obj/screen/plane_master/parallax_spacemaster/parallax_spacemaster = null - var/initialized = FALSE - - var/authed = TRUE \ No newline at end of file + var/authed = TRUE diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index eb130d7b58e..cb0b54c39ce 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -358,9 +358,9 @@ return m //Do auth shit else - . = ..() src.InitClient() src.InitPrefs() + . = ..() /client/proc/InitPrefs() //preferences datum - also holds some persistant data for the client (because we may as well keep these datums to a minimum) @@ -385,8 +385,6 @@ server_greeting.display_to_client(src) /client/proc/InitClient() - if(initialized) - return to_chat(src, "If the title screen is black, resources are still downloading. Please be patient until the title screen appears.") //Admin Authorisation @@ -447,8 +445,6 @@ fetch_unacked_warning_count() - initialized = TRUE - ////////////// //DISCONNECT// ////////////// diff --git a/code/modules/mob/abstract/new_player/login.dm b/code/modules/mob/abstract/new_player/login.dm index a1ff033bd93..37fe2a15d4b 100644 --- a/code/modules/mob/abstract/new_player/login.dm +++ b/code/modules/mob/abstract/new_player/login.dm @@ -25,8 +25,6 @@ var/client/my_client // Need to keep track of this ourselves, since by the time Logout() is called the client has already been nulled /mob/abstract/new_player/Login() - client.InitClient() - client.InitPrefs() update_Login_details() //handles setting lastKnownIP and computer_id for use by the ban systems as well as checking for multikeying to_chat(src, "
Game ID:
[game_id]
") diff --git a/code/modules/mob/abstract/unauthed/login.dm b/code/modules/mob/abstract/unauthed/login.dm index 1f1026b4ed2..fa4d4fa1bb2 100644 --- a/code/modules/mob/abstract/unauthed/login.dm +++ b/code/modules/mob/abstract/unauthed/login.dm @@ -51,11 +51,14 @@ if(newkey) client.key = newkey // Try seeting ckey directory[c.ckey] = c - // If mob exists for that ckey, then BYOND will transfer client to it. + // Init the client and give it a new_player mob. + // Note that modifying the key variable does not invoke client/New() or client/Login() again. + c.InitClient() + c.InitPrefs() + if(istype(c.mob, /mob/abstract/unauthed)) - c.mob = new /mob/abstract/new_player() // Else we just treat them as new player - c.InitClient() // And now we shall continue client initilization (permissions and stuff) - c.InitPrefs() // We init prefs just in case mob transfer didn't + c.mob = new /mob/abstract/new_player() + unauthed -= token /mob/abstract/unauthed/Topic(href, href_list) diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 306a8ad13e2..dbbe6632bb5 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -24,8 +24,6 @@ log_access("Notice: [key_name(src)] has the same [matches] as [key_name(M)] (no longer logged in).",ckey=key_name(src)) /mob/Login() - client.InitClient() - client.InitPrefs() // Init perfs in case they wasn't initilized player_list |= src update_Login_details() SSfeedback.update_status() diff --git a/html/changelogs/skull132_greeting-window.yml b/html/changelogs/skull132_greeting-window.yml new file mode 100644 index 00000000000..7fb06ac70e6 --- /dev/null +++ b/html/changelogs/skull132_greeting-window.yml @@ -0,0 +1,5 @@ +author: Skull132 +delete-after: True + +changes: + - bugfix: "The greeting window no longer malfunctions."