From 09aaba71986a1b06b7c14b0dc31642e06323fcdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Thu, 8 Oct 2020 01:00:43 -0700 Subject: [PATCH] I think this is better --- MWSE/mods/celediel/NPCsGoHome/functions/processors.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua b/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua index a2a11df..7987da3 100644 --- a/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua +++ b/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua @@ -90,10 +90,8 @@ end local function reEnableNPCs(npcs) for id, ref in pairs(npcs) do - -- if the player moves too far away, trying to enable NPCs causes crashes - -- leave them in the runtimeData until they can be re-enabled - if ref and ref.object then - log(common.logLevels.medium, "[PROC] Enabling homeless %s", ref.object.name) + if ref.object and ref.disabled then + log(common.logLevels.medium, "[PROC] Enabling homeless %s", id) -- ref:enable() mwscript.enable({reference = ref})