mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-20 06:13:17 -04:00
Update mods/default/init.lua
Avoid falling nodes being stuck in between another nodes when given not integer coords.
This commit is contained in:
parent
87a1e37d34
commit
27d308c985
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue