Make throwables only collide on solid nodes
This commit is contained in:
parent
460f7a1962
commit
7e7d3acb08
2 changed files with 8 additions and 5 deletions
|
@ -70,7 +70,8 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
|
|||
end
|
||||
|
||||
if self.lastpos.x~=nil then
|
||||
if node.name ~= "air" then
|
||||
local def = minetest.registered_nodes[node.name]
|
||||
if (def and def.walkable) or not def then
|
||||
minetest.add_item(self.lastpos, 'mcl_throwing:arrow')
|
||||
self.object:remove()
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue