From bbbd4360d0c666b35debc311702a63358c645e7b Mon Sep 17 00:00:00 2001 From: Menshin Date: Mon, 23 Nov 2015 00:19:35 +0100 Subject: [PATCH] Fixes login runtimes for observers. Some failsafes for new_player login. --- code/datums/mind.dm | 6 ++++++ code/modules/mob/new_player/login.dm | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 297576372ed..8e06a970e71 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -1694,6 +1694,12 @@ mind_initialize() //updates the mind (or creates and initializes one if one doesn't exist) mind.active = 1 //indicates that the mind is currently synced with a client +/mob/new_player/sync_mind() + return + +/mob/dead/observer/sync_mind() + return + //Initialisation procs /mob/proc/mind_initialize() if(mind) diff --git a/code/modules/mob/new_player/login.dm b/code/modules/mob/new_player/login.dm index 1b188f6b601..3448469b89d 100644 --- a/code/modules/mob/new_player/login.dm +++ b/code/modules/mob/new_player/login.dm @@ -1,4 +1,9 @@ /mob/new_player/Login() + if(!mind) + mind = new /datum/mind(key) + mind.active = 1 + mind.current = src + ..() if(join_motd) @@ -10,11 +15,6 @@ if(config.soft_popcap && living_player_count() >= config.soft_popcap) src << "Server Notice:\n \t [config.soft_popcap_message]" - if(!mind) - mind = new /datum/mind(key) - mind.active = 1 - mind.current = src - if(length(newplayer_start)) loc = pick(newplayer_start) else