Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Item entity: Delete in 'ignore' nodes
  • Loading branch information
paramat committed Feb 13, 2018
1 parent 737f0b4 commit 1156088
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions builtin/game/item_entity.lua
Expand Up @@ -145,11 +145,17 @@ core.register_entity(":__builtin:item", {
y = pos.y + self.object:get_properties().collisionbox[2] - 0.05,
z = pos.z
})
-- Delete in 'ignore' nodes
if node and node.name == "ignore" then
self.itemstring = ""
self.object:remove()
return
end

local vel = self.object:getvelocity()
local def = node and core.registered_nodes[node.name]
-- 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_moving = (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
Expand Down

0 comments on commit 1156088

Please sign in to comment.