mirror of
				https://github.com/sys4-fr/server-nalc.git
				synced 2025-10-31 04:25:32 +01:00 
			
		
		
		
	fix crash when tools has not full_punch_interval(netherpick)
This commit is contained in:
		| @@ -1126,7 +1126,7 @@ end | ||||
| 		on_punch = function(self, hitter, tflp, tool_capabilities, dir) | ||||
| 			-- weapon wear | ||||
| 			local weapon = hitter:get_wielded_item() | ||||
| 			if weapon:get_definition().tool_capabilities ~= nil then | ||||
| 			if weapon:get_definition().tool_capabilities ~= nil and weapon:get_definition().tool_capabilities.full_punch_interval ~= nil then | ||||
| 				local wear = ( weapon:get_definition().tool_capabilities.full_punch_interval / 75 ) * 9000 | ||||
| 				weapon:add_wear(wear) | ||||
| 				hitter:set_wielded_item(weapon) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user