mirror of
https://github.com/APercy/airutils.git
synced 2025-03-15 08:01:22 +00:00
added verification before attaching
This commit is contained in:
parent
09e6d0d42d
commit
fa935b5e51
1 changed files with 3 additions and 0 deletions
|
@ -76,6 +76,9 @@ function airutils.simple_external_attach(self, relative_pos, entity_name, radius
|
|||
attach_up = attach_up or false
|
||||
radius = radius or 12
|
||||
if self.object then
|
||||
local curr_ent, curr_obj = airutils.get_attached_entity(self)
|
||||
if curr_ent then return end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
local nearby_objects = minetest.get_objects_inside_radius(pos, radius)
|
||||
for i,obj in ipairs(nearby_objects) do
|
||||
|
|
Loading…
Add table
Reference in a new issue