I think this is better
This commit is contained in:
parent
a3a7cea86f
commit
09aaba7198
|
@ -90,10 +90,8 @@ end
|
||||||
|
|
||||||
local function reEnableNPCs(npcs)
|
local function reEnableNPCs(npcs)
|
||||||
for id, ref in pairs(npcs) do
|
for id, ref in pairs(npcs) do
|
||||||
-- if the player moves too far away, trying to enable NPCs causes crashes
|
if ref.object and ref.disabled then
|
||||||
-- leave them in the runtimeData until they can be re-enabled
|
log(common.logLevels.medium, "[PROC] Enabling homeless %s", id)
|
||||||
if ref and ref.object then
|
|
||||||
log(common.logLevels.medium, "[PROC] Enabling homeless %s", ref.object.name)
|
|
||||||
|
|
||||||
-- ref:enable()
|
-- ref:enable()
|
||||||
mwscript.enable({reference = ref})
|
mwscript.enable({reference = ref})
|
||||||
|
|
Loading…
Reference in a new issue