Fix occasional crash with capture tool

This commit is contained in:
Sys Quatre 2020-08-16 09:55:05 +02:00
parent ea7c3eb27b
commit 2f63c8aa42

View File

@ -14,6 +14,7 @@ minetest.register_tool("maidroid_tool:capture_rod", {
local obj = pointed_thing.ref
local luaentity = obj:get_luaentity()
if not luaentity then return end
if not maidroid.is_maidroid(luaentity.name) then
if luaentity.name == "__builtin:item" then
luaentity:on_punch(user)