fix crash by nil damagegroup

master
AiTechEye 2018-07-27 08:22:47 +02:00 committed by GitHub
parent 9d023c0a97
commit ff7e2acbbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -211,6 +211,7 @@ on_punch=function(self, puncher, time_from_last_punch, tool_capabilities, dir)
aliveai.max(self,true)
return self
end
tool_capabilities.damage_groups.fleshy=tool_capabilities.damage_groups.fleshy or 1
local mindmg=tool_capabilities.damage_groups.fleshy>=self.mindamage
local dmg=0
@ -668,4 +669,4 @@ minetest.register_craftitem("aliveai:teampawner", {
end
return itemstack
end,
})
})