From: oilboi <47129783+oilboi@users.noreply.github.com> Date: Tue, 30 Jun 2020 05:27:20 +0000 (-0400) Subject: Fix repeated player death when in lava or fire X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=db119c20bef29ff82ae419910a251e79a5ca97bb;p=Crafter.git Fix repeated player death when in lava or fire --- diff --git a/mods/fire/init.lua b/mods/fire/init.lua index 9b3f456..6ce93d1 100644 --- a/mods/fire/init.lua +++ b/mods/fire/init.lua @@ -144,9 +144,11 @@ fire.timer = 0 fire.life = 0 fire.on_step = function(self,dtime) if self.owner and (self.owner:is_player() or self.owner:get_luaentity()) then + if self.owner:is_player() and self.owner:get_hp() <= 0 then + put_fire_out(self.owner) + end self.timer = self.timer + dtime self.life = self.life + dtime - if self.life >= 7 then put_fire_out(self.owner) self.object:remove()