on_activate = function(self, staticdata)
self.object:set_armor_groups({immortal=1})
- --self.object:setacceleration({x=0, y=-10, z=0})
self:set_node({name=staticdata})
end,
core.add_node(np, self.node)
self.object:remove()
nodeupdate(np)
- else
- -- Do nothing
+ return
+ end
+ local vel = self.object:getvelocity()
+ if vector.equals(vel, {x=0,y=0,z=0}) then
+ local npos = self.object:getpos()
+ self.object:setpos(vector.round(npos))
end
end
})
if delay then
core.after(0.1, nodeupdate_single, {x=p.x, y=p.y, z=p.z}, false)
else
- n.level = core.env:get_node_level(p)
+ n.level = core.get_node_level(p)
core.remove_node(p)
spawn_falling_node(p, n)
nodeupdate(p)