Update mods/default/init.lua

Avoid falling nodes being stuck in between another nodes when given not integer coords.
This commit is contained in:
RealBadAngel 2012-10-23 23:55:04 +03:00
parent 87a1e37d34
commit 27d308c985
1 changed files with 3 additions and 0 deletions

View File

@ -1690,6 +1690,9 @@ minetest.register_entity("default:falling_node", {
})
function default.spawn_falling_node(p, nodename)
p.x=math.floor(p.x)
p.y=math.floor(p.y)
p.z=math.floor(p.z)
obj = minetest.env:add_entity(p, "default:falling_node")
obj:get_luaentity():set_node(nodename)
end