1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-15 23:10:31 +01:00

[mobs] Fix crash

This commit is contained in:
LeMagnesium 2015-10-03 20:17:31 +02:00
parent 39110eaa97
commit 8ae784743d

View File

@ -1112,7 +1112,7 @@ end
-- weapon wear
hitter:set_detach() --MFF (crabman|27/7/2015) anti usebug, immortal if attached
local weapon = hitter:get_wielded_item()
local punch_interval = tool_capabilities.full_punch_interval or 1.4
local punch_interval = (tool_capabilities or {full_punch_interval = 1.4}).full_punch_interval
if weapon:get_definition().tool_capabilities ~= nil then
local wear = (punch_interval / 75) * 9000
weapon:add_wear(wear)