Item entity: Prevent motion in ignore nodes

This commit is contained in:
paramat 2018-02-01 01:12:56 +00:00 committed by Nils Dagsson Moskopp
parent dc9f1819f8
commit 21112d78d9
Signed by: erle
GPG Key ID: A3BC671C35191080
1 changed files with 3 additions and 3 deletions

View File

@ -147,9 +147,9 @@ core.register_entity(":__builtin:item", {
})
local vel = self.object:getvelocity()
local def = node and core.registered_nodes[node.name]
-- Ignore is nil -> stop until the block loaded
local is_moving = (def and not def.walkable) or
vel.x ~= 0 or vel.y ~= 0 or vel.z ~= 0
-- Avoid entity falling into ignore nodes or unloaded areas
local is_moving = node and node.name ~= "ignore" and
((def and not def.walkable) or vel.x ~= 0 or vel.y ~= 0 or vel.z ~= 0)
local is_slippery = false
if def and def.walkable then