From: Anthony Zhang Date: Tue, 21 May 2013 21:44:05 +0000 (-0400) Subject: Fix the teleport tube in the latest mt. X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=93fb11791ca7cd5fd49a276803470fa425020e0f;p=zefram%2Fminetest%2Fpipeworks.git Fix the teleport tube in the latest mt. --- diff --git a/teleport_tube.lua b/teleport_tube.lua index c162952..76370c2 100644 --- a/teleport_tube.lua +++ b/teleport_tube.lua @@ -74,12 +74,12 @@ register_tube("pipeworks:teleport_tube","Teleporter pneumatic tube segment",tele velocity.z=0 local meta = minetest.env:get_meta(pos) channel=meta:get_string("channel") - goto=get_tubes_in_file(pos,channel) - if goto[1]==nil then return {} end - d=math.random(1,#goto) - pos.x=goto[d].x - pos.y=goto[d].y - pos.z=goto[d].z + local target=get_tubes_in_file(pos,channel) + if target[1]==nil then return {} end + d=math.random(1,#target) + pos.x=target[d].x + pos.y=target[d].y + pos.z=target[d].z return meseadjlist end}, on_construct = function(pos)