forked from Mirrorlandia_minetest/minetest
Item entity: Prevent motion in ignore nodes
This commit is contained in:
parent
7b2687ffc6
commit
520293b4cb
@ -147,9 +147,9 @@ core.register_entity(":__builtin:item", {
|
|||||||
})
|
})
|
||||||
local vel = self.object:getvelocity()
|
local vel = self.object:getvelocity()
|
||||||
local def = node and core.registered_nodes[node.name]
|
local def = node and core.registered_nodes[node.name]
|
||||||
-- Ignore is nil -> stop until the block loaded
|
-- Avoid entity falling into ignore nodes or unloaded areas
|
||||||
local is_moving = (def and not def.walkable) or
|
local is_moving = node and node.name ~= "ignore" and
|
||||||
vel.x ~= 0 or vel.y ~= 0 or vel.z ~= 0
|
((def and not def.walkable) or vel.x ~= 0 or vel.y ~= 0 or vel.z ~= 0)
|
||||||
local is_slippery = false
|
local is_slippery = false
|
||||||
|
|
||||||
if def and def.walkable then
|
if def and def.walkable then
|
||||||
|
Loading…
Reference in New Issue
Block a user