From f1200a528bebc4209eb5571cd56e7b812d9f2a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Tue, 13 Oct 2020 21:46:39 -0700 Subject: [PATCH] don't update positions for the same cell twice --- MWSE/mods/celediel/NPCsGoHome/functions/processors.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua b/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua index 3be794a..2cfff51 100644 --- a/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua +++ b/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua @@ -189,7 +189,9 @@ this.searchCellsForPositions = function() updatePositions(door.destination.cell) -- one more time for internalDoor in door.destination.cell:iterateReferences(tes3.objectType.door) do - if internalDoor.destination then updatePositions(internalDoor.destination.cell) end + if internalDoor.destination and internalDoor.destination.cell ~= cell then + updatePositions(internalDoor.destination.cell) + end end end end