From 14a0eb8cca2e7741813f8e972357a91947ca6b24 Mon Sep 17 00:00:00 2001 From: stujones11 Date: Wed, 6 May 2015 20:06:07 +0100 Subject: [PATCH] Fix armor damage when using fire protection (my bad) --- 3d_armor/armor.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/3d_armor/armor.lua b/3d_armor/armor.lua index 20a5017..875e126 100644 --- a/3d_armor/armor.lua +++ b/3d_armor/armor.lua @@ -243,13 +243,14 @@ armor.update_armor = function(self, player, dtime) -- check for fire protection, if not enough then get hurt if row[1] == node_head or row[1] == node_feet then if hp > 0 and armor.def[name].fire < row[2] then - player:set_hp(hp - row[3] * dtime) + hp = hp - row[3] * dtime + player:set_hp(hp) break end end end end - if hp == 0 or hp == self.player_hp[name] then + if hp <= 0 or hp == self.player_hp[name] then return end if self.player_hp[name] > hp then