mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2024-12-25 18:20:20 +01:00
fix local
This commit is contained in:
parent
3e458e1e49
commit
6bf601f29f
8
api.lua
8
api.lua
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
-- Mobs Api (30th July 2017)
|
-- Mobs Api (3rd August 2017)
|
||||||
|
|
||||||
mobs = {}
|
mobs = {}
|
||||||
mobs.mod = "redo"
|
mobs.mod = "redo"
|
||||||
mobs.version = "20170730"
|
mobs.version = "20170803"
|
||||||
|
|
||||||
|
|
||||||
-- Intllib
|
-- Intllib
|
||||||
@ -1255,9 +1255,9 @@ local npc_attack = function(self)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local p, sp, obj, min_player
|
||||||
local s = self.object:getpos()
|
local s = self.object:getpos()
|
||||||
local min_dist = self.view_range + 1
|
local min_dist = self.view_range + 1
|
||||||
local obj, min_player = nil, nil
|
|
||||||
local objs = minetest.get_objects_inside_radius(s, self.view_range)
|
local objs = minetest.get_objects_inside_radius(s, self.view_range)
|
||||||
|
|
||||||
for n = 1, #objs do
|
for n = 1, #objs do
|
||||||
@ -1266,7 +1266,7 @@ local npc_attack = function(self)
|
|||||||
|
|
||||||
if obj and obj.type == "monster" then
|
if obj and obj.type == "monster" then
|
||||||
|
|
||||||
local p = obj.object:getpos()
|
p = obj.object:getpos()
|
||||||
|
|
||||||
dist = get_distance(p, s)
|
dist = get_distance(p, s)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user