From 6bf601f29f46076b9c1c3c6d5da81e47741a9274 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Thu, 3 Aug 2017 19:19:25 +0100 Subject: fix local --- api.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'api.lua') diff --git a/api.lua b/api.lua index 7bc0119..336fb04 100644 --- a/api.lua +++ b/api.lua @@ -1,9 +1,9 @@ --- Mobs Api (30th July 2017) +-- Mobs Api (3rd August 2017) mobs = {} mobs.mod = "redo" -mobs.version = "20170730" +mobs.version = "20170803" -- Intllib @@ -1255,9 +1255,9 @@ local npc_attack = function(self) return end + local p, sp, obj, min_player local s = self.object:getpos() local min_dist = self.view_range + 1 - local obj, min_player = nil, nil local objs = minetest.get_objects_inside_radius(s, self.view_range) for n = 1, #objs do @@ -1266,7 +1266,7 @@ local npc_attack = function(self) if obj and obj.type == "monster" then - local p = obj.object:getpos() + p = obj.object:getpos() dist = get_distance(p, s) -- cgit v1.2.3