I think this is better

This commit is contained in:
Lilian Jónsdóttir 2020-10-08 01:00:43 -07:00
parent a3a7cea86f
commit 09aaba7198

View file

@ -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})