detach the player when punch mobs, anit usebug, immortal if attached

This commit is contained in:
crabman77 2015-07-27 15:53:30 +02:00
parent 0a1d69d142
commit 086942329e
1 changed files with 1 additions and 0 deletions

View File

@ -1133,6 +1133,7 @@ end
on_punch = function(self, hitter, tflp, tool_capabilities, dir)
-- weapon wear
hitter:set_detach() --MFF (crabman|27/7/2015) anti usebug, immortal if attached
local weapon = hitter:get_wielded_item()
if weapon:get_definition().tool_capabilities ~= nil then
local wear = ( (weapon:get_definition().tool_capabilities.full_punch_interval or 1.4) / 75 ) * 9000