mirror of
https://github.com/minetest-mods/technic.git
synced 2025-01-03 03:07:36 +01:00
Merge pull request #8 from khonkhortisan/master
check whether an object is really a luaentity before trying to get its name
This commit is contained in:
commit
39fdb88cde
@ -373,8 +373,8 @@ function move_nodes_vect(poslist,vect)
|
|||||||
end
|
end
|
||||||
for _,obj in ipairs(objects) do
|
for _,obj in ipairs(objects) do
|
||||||
obj:setpos(addVect(obj:getpos(),vect))
|
obj:setpos(addVect(obj:getpos(),vect))
|
||||||
if obj:get_luaentity().name == "pipeworks:tubed_item" then
|
le=obj:get_luaentity()
|
||||||
le=obj:get_luaentity()
|
if le and le.name == "pipeworks:tubed_item" then
|
||||||
le.start_pos=addVect(le.start_pos,vect)
|
le.start_pos=addVect(le.start_pos,vect)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user