summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorparamat <paramat@users.noreply.github.com>2018-02-01 01:12:56 +0000
committerparamat <mat.gregory@virginmedia.com>2018-02-05 05:07:29 +0000
commit520293b4cbcdc0ae3c435150114dfe0be7f9582d (patch)
tree579d9e6989d96556fa3fd8e45b7cc2ccb91eef0e /builtin
parent7b2687ffc681ec927fe960d1e92158a93f925a45 (diff)
downloadminetest-520293b4cbcdc0ae3c435150114dfe0be7f9582d.tar.gz
minetest-520293b4cbcdc0ae3c435150114dfe0be7f9582d.tar.bz2
minetest-520293b4cbcdc0ae3c435150114dfe0be7f9582d.zip
Item entity: Prevent motion in ignore nodes
Diffstat (limited to 'builtin')
-rw-r--r--builtin/game/item_entity.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/game/item_entity.lua b/builtin/game/item_entity.lua
index 06e67762c..a18467764 100644
--- a/builtin/game/item_entity.lua
+++ b/builtin/game/item_entity.lua
@@ -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