diff options
author | Novatux <nathanael.courant@laposte.net> | 2013-01-19 17:13:47 +0100 |
---|---|---|
committer | Novatux <nathanael.courant@laposte.net> | 2013-01-19 17:13:47 +0100 |
commit | a77095ebe6e11ceab88d8b6c8a68a9b6c4440d3f (patch) | |
tree | 9fa421bf6727d7589e1d50512d5bafd9bed20d7e | |
parent | b3fcf6734fe9c48c7d719612f29dabd6846dcc19 (diff) | |
download | pipeworks-a77095ebe6e11ceab88d8b6c8a68a9b6c4440d3f.tar pipeworks-a77095ebe6e11ceab88d8b6c8a68a9b6c4440d3f.tar.gz pipeworks-a77095ebe6e11ceab88d8b6c8a68a9b6c4440d3f.tar.bz2 pipeworks-a77095ebe6e11ceab88d8b6c8a68a9b6c4440d3f.tar.xz pipeworks-a77095ebe6e11ceab88d8b6c8a68a9b6c4440d3f.zip |
Fixed a bug where items were not moved after teleport tube when they went to the same direction.
-rw-r--r-- | item_transport.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/item_transport.lua b/item_transport.lua index 275d3e8..bed8f31 100644 --- a/item_transport.lua +++ b/item_transport.lua @@ -222,6 +222,8 @@ minetest.register_entity("pipeworks:tubed_item", { end end + local sposcopy={x=self.start_pos.x,y=self.start_pos.y,z=self.start_pos.z} + node = minetest.env:get_node(self.start_pos) if moved and minetest.get_item_group(node.name,"tubedevice_receiver")==1 then if minetest.registered_nodes[node.name].tube and minetest.registered_nodes[node.name].tube.insert_object then @@ -254,7 +256,8 @@ minetest.register_entity("pipeworks:tubed_item", { end end - if velocity.x~=velocitycopy.x or velocity.y~=velocitycopy.y or velocity.z~=velocitycopy.z then + if velocity.x~=velocitycopy.x or velocity.y~=velocitycopy.y or velocity.z~=velocitycopy.z or + self.start_pos.x~=sposcopy.x or self.start_pos.y~=sposcopy.y or self.start_pos.z~=sposcopy.z then self.object:setpos(self.start_pos) self.object:setvelocity(velocity) end |