1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-16 07:20:31 +01:00

Remove our fix and replace with better Tenplus1's fix

This commit is contained in:
crabman77 2015-07-18 15:58:20 +02:00
parent 637c06f6cc
commit 34ae29e899

View File

@ -1130,8 +1130,8 @@ end
on_punch = function(self, hitter, tflp, tool_capabilities, dir) on_punch = function(self, hitter, tflp, tool_capabilities, dir)
-- weapon wear -- weapon wear
local weapon = hitter:get_wielded_item() local weapon = hitter:get_wielded_item()
if weapon:get_definition().tool_capabilities ~= nil and weapon:get_definition().tool_capabilities.full_punch_interval ~= nil then if weapon:get_definition().tool_capabilities ~= nil then
local wear = ( weapon:get_definition().tool_capabilities.full_punch_interval / 75 ) * 9000 local wear = ( (weapon:get_definition().tool_capabilities.full_punch_interval or 1.4) / 75 ) * 9000
weapon:add_wear(wear) weapon:add_wear(wear)
hitter:set_wielded_item(weapon) hitter:set_wielded_item(weapon)
end end