Item entity: Prevent motion in ignore nodes
authorparamat <paramat@users.noreply.github.com>
Thu, 1 Feb 2018 01:12:56 +0000 (01:12 +0000)
committerparamat <mat.gregory@virginmedia.com>
Mon, 5 Feb 2018 05:07:29 +0000 (05:07 +0000)
builtin/game/item_entity.lua

index 06e67762c95dd76a2c87a9b51ff9d23c6e4b82ba..a184677643194c95fc5c167401ec98d61820a524 100644 (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