From 755dd262086da5469489d74c919e6870870eca57 Mon Sep 17 00:00:00 2001 From: thetaepsilon-gamedev Date: Tue, 19 Dec 2017 18:17:22 +0000 Subject: [PATCH] item_transport.lua: move tube limit checking before can_go() callback in go_next() --- item_transport.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/item_transport.lua b/item_transport.lua index cf9e5c4..154b6db 100644 --- a/item_transport.lua +++ b/item_transport.lua @@ -89,6 +89,9 @@ local function go_next(pos, velocity, stack, owner) speed = 1 end vel.speed = speed + + crunch_tube(pos, cnode, cmeta) + if minetest.registered_nodes[cnode.name] and minetest.registered_nodes[cnode.name].tube and minetest.registered_nodes[cnode.name].tube.can_go then can_go = minetest.registered_nodes[cnode.name].tube.can_go(pos, cnode, vel, stack) else @@ -116,8 +119,6 @@ local function go_next(pos, velocity, stack, owner) end end - crunch_tube(pos, cnode, cmeta) - if not next_positions[1] then return false, nil end