Fix crash if on_punch was called w/ nil damage

This commit is contained in:
Wuzzy 2022-02-19 23:27:23 +01:00
parent 0abcd7960a
commit 8a449ea8a8

View File

@ -151,7 +151,7 @@ MUMMY_DEF.on_punch = function(self, puncher, time_from_last_punch, tool_capabili
end
self.attacker = puncher
if damage > 0 then
if damage and damage > 0 then
self.last_damage = {
type = "punch",
puncher = puncher,