mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-23 00:10:25 +01:00
detach the player when punch mobs, anit usebug, immortal if attached
This commit is contained in:
parent
0a1d69d142
commit
086942329e
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user