From 398cb4c656ee2fccee40e2a745c3ce9a92e6dd2f Mon Sep 17 00:00:00 2001 From: cora Date: Sun, 29 Nov 2020 16:20:11 +0100 Subject: [PATCH] autotool: reset old wield index (with proper wait) --- clientmods/dragonfire/inventory/autotool.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clientmods/dragonfire/inventory/autotool.lua b/clientmods/dragonfire/inventory/autotool.lua index def951abf..ff4432c35 100644 --- a/clientmods/dragonfire/inventory/autotool.lua +++ b/clientmods/dragonfire/inventory/autotool.lua @@ -37,8 +37,9 @@ function autotool.autotool(pos) new_index = index - 1 end end - odx = player:get_wield_index() + local odx = player:get_wield_index() player:set_wield_index(new_index) + minetest.after(best_time + 0.05,function() player:set_wield_index(odx) end) end minetest.register_on_punchnode(function(pos,node) -- 2.11.4.GIT