From f98137e59da1ad28e5cea722e46e070f002708ef Mon Sep 17 00:00:00 2001 From: Aziz Chynaliev Date: Sun, 9 Jan 2022 15:51:05 +0300 Subject: [PATCH] Fix: avoid sleeping SSTicker (#561) * Fix: Avoid sleeping the ticker * Refactor: Use waitfor Co-authored-by: Simon Ogorodnik --- code/controllers/subsystem/ticker.dm | 3 ++- code/modules/mob/new_player/new_player.dm | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index c82e6aeacd97..55e7747cd527 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -86,7 +86,8 @@ SUBSYSTEM_DEF(ticker) current_state = GAME_STATE_PREGAME fire() // TG says this is a good idea for(var/mob/new_player/N in GLOB.player_list) - N.new_player_panel_proc() // to enable the observe option + if (N.client) + N.new_player_panel_proc() // to enable the observe option if(GAME_STATE_PREGAME) if(!SSticker.ticker_going) // This has to be referenced like this, and I dont know why. If you dont put SSticker. it will break return diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index d9bd1f291ba9..81d4bce8f766 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -44,6 +44,7 @@ /mob/new_player/proc/new_player_panel_proc() + set waitfor = FALSE var/real_name = client.prefs.real_name if(client.prefs.toggles2 & PREFTOGGLE_2_RANDOMSLOT) real_name = "Random Character Slot"