mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-03-21 15:21:24 +00:00
Bug fix
This commit is contained in:
parent
3b1085f309
commit
a71cf18e84
1 changed files with 2 additions and 2 deletions
4
api.lua
4
api.lua
|
@ -380,7 +380,7 @@ end
|
||||||
function creatura.get_nearby_object(self, name, range)
|
function creatura.get_nearby_object(self, name, range)
|
||||||
local objects = minetest.get_objects_inside_radius(self:get_center_pos(), range or self.tracking_range)
|
local objects = minetest.get_objects_inside_radius(self:get_center_pos(), range or self.tracking_range)
|
||||||
for _, object in ipairs(objects) do
|
for _, object in ipairs(objects) do
|
||||||
local ent = creatura.is_alive(ent) and object:get_luaentity()
|
local ent = creatura.is_alive(object) and object:get_luaentity()
|
||||||
if ent
|
if ent
|
||||||
and object ~= self.object
|
and object ~= self.object
|
||||||
and not ent._ignore
|
and not ent._ignore
|
||||||
|
@ -395,7 +395,7 @@ function creatura.get_nearby_objects(self, name, range)
|
||||||
local objects = minetest.get_objects_inside_radius(self:get_center_pos(), range or self.tracking_range)
|
local objects = minetest.get_objects_inside_radius(self:get_center_pos(), range or self.tracking_range)
|
||||||
local nearby = {}
|
local nearby = {}
|
||||||
for _, object in ipairs(objects) do
|
for _, object in ipairs(objects) do
|
||||||
local ent = creatura.is_alive(ent) and object:get_luaentity()
|
local ent = creatura.is_alive(object) and object:get_luaentity()
|
||||||
if ent
|
if ent
|
||||||
and object ~= self.object
|
and object ~= self.object
|
||||||
and not ent._ignore
|
and not ent._ignore
|
||||||
|
|
Loading…
Add table
Reference in a new issue