mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 02:21:06 +01:00
Fix crash with itementity and unloaded nodes
This commit is contained in:
parent
7a6a84b2a2
commit
2b2ba47aed
1 changed files with 3 additions and 2 deletions
|
@ -853,9 +853,10 @@ minetest.register_entity(":__builtin:item", {
|
|||
|
||||
-- If node is not registered or node is walkably solid and resting on nodebox
|
||||
local nn = minetest.get_node({x=p.x, y=p.y-0.5, z=p.z}).name
|
||||
local def = minetest.registered_nodes[nn]
|
||||
local v = self.object:get_velocity()
|
||||
local is_on_floor = (minetest.registered_nodes[nn].walkable
|
||||
and not minetest.registered_nodes[nn].groups.slippery and v.y == 0)
|
||||
local is_on_floor = def and (def.walkable
|
||||
and not def.groups.slippery and v.y == 0)
|
||||
|
||||
if not minetest.registered_nodes[nn]
|
||||
or is_floating or is_on_floor then
|
||||
|
|
Loading…
Reference in a new issue