Fix crash when hit with an arrow that is not piercing

This commit is contained in:
teknomunk 2024-09-27 20:09:37 -05:00
parent 112d3c1a77
commit 799e734315
1 changed files with 1 additions and 1 deletions

View File

@ -268,7 +268,7 @@ local arrow_entity = {
local hook = item_def and item_def._on_collide_with_entity local hook = item_def and item_def._on_collide_with_entity
if hook then hook(self, pos, obj) end if hook then hook(self, pos, obj) end
if self._piercing > 0 then if (self._piercing or 0) > 0 then
self._piercing = self._piercing - 1 self._piercing = self._piercing - 1
return return
end end