From: ShadowNinja Date: Thu, 26 Jun 2014 20:53:38 +0000 (-0400) Subject: Fix the chainsaw's protection check X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=51c02e9c8a7b95befb5134a71f61f8ae92804ee5;p=zefram%2Fminetest%2Ftechnic.git Fix the chainsaw's protection check --- diff --git a/technic/tools/chainsaw.lua b/technic/tools/chainsaw.lua index 4a1bfd8..503c010 100644 --- a/technic/tools/chainsaw.lua +++ b/technic/tools/chainsaw.lua @@ -289,9 +289,9 @@ minetest.register_tool("technic:chainsaw", { end local name = user:get_player_name() - if minetest.is_protected(pos, name) then - minetest.record_protection_violation(pos, name) - return current_charge + if minetest.is_protected(pointed_thing.under, name) then + minetest.record_protection_violation(pointed_thing.under, name) + return end -- Send current charge to digging function so that the