1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-09-28 23:40:34 +02:00

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

View File

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