From 99f161ca80ec94e7bd51052d5a9b1ffebe386a9e Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 11 Jul 2020 11:53:58 +0200 Subject: [PATCH] Localize 2 endermen vars --- mods/ENTITIES/mobs_mc/enderman.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/enderman.lua b/mods/ENTITIES/mobs_mc/enderman.lua index 9b4857e292..2a5deb2edf 100644 --- a/mods/ENTITIES/mobs_mc/enderman.lua +++ b/mods/ENTITIES/mobs_mc/enderman.lua @@ -282,7 +282,7 @@ mobs:register_mob("mobs_mc:enderman", { local enderpos = self.object:get_pos() local objs = minetest.get_objects_inside_radius(enderpos, 4) for n = 1, #objs do - obj = objs[n] + local obj = objs[n] if obj then if minetest.is_player(obj) then -- Warp from players during day. @@ -290,7 +290,7 @@ mobs:register_mob("mobs_mc:enderman", { self:teleport(nil) end else - lua = obj:get_luaentity() + local lua = obj:get_luaentity() if lua then if lua.name == "mcl_bows:arrow_entity" then self:teleport(nil)