Small AutoTool Fix
parent
8b3eaf5b05
commit
3df23e23cd
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue