From 3df23e23cd1ace3449660077665f5ebe3e13fdc2 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Tue, 1 Dec 2020 10:59:02 +0100 Subject: Small AutoTool Fix --- builtin/client/cheats/inventory.lua | 2 +- builtin/client/util.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/client/cheats/inventory.lua b/builtin/client/cheats/inventory.lua index bb32d7d8b..024bc5e98 100644 --- a/builtin/client/cheats/inventory.lua +++ b/builtin/client/cheats/inventory.lua @@ -86,7 +86,7 @@ local function find_best_tool(nodename) end function core.select_best_tool(nodename) - player:set_wield_index(find_best_tool(nodename)) + core.localplayer:set_wield_index(find_best_tool(nodename)) end local new_index, old_index, pointed_pos diff --git a/builtin/client/util.lua b/builtin/client/util.lua index 42e383c5c..30f983af3 100644 --- a/builtin/client/util.lua +++ b/builtin/client/util.lua @@ -41,7 +41,7 @@ end function core.get_pointed_thing() local pos = core.camera:get_pos() - local pos2 = vector.add(pos, vector.multiply(core.camera:get_look_dir(), 5)) + local pos2 = vector.add(pos, vector.multiply(core.camera:get_look_dir(), 7)) local player = core.localplayer if not player then return end local item = player:get_wielded_item() -- cgit v1.2.3