forked from mtcontrib/3d_armor
Fix armor damage when using fire protection (my bad)
This commit is contained in:
parent
e1ffdd6a0d
commit
14a0eb8cca
@ -243,13 +243,14 @@ armor.update_armor = function(self, player, dtime)
|
|||||||
-- check for fire protection, if not enough then get hurt
|
-- check for fire protection, if not enough then get hurt
|
||||||
if row[1] == node_head or row[1] == node_feet then
|
if row[1] == node_head or row[1] == node_feet then
|
||||||
if hp > 0 and armor.def[name].fire < row[2] 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
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
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
|
return
|
||||||
end
|
end
|
||||||
if self.player_hp[name] > hp then
|
if self.player_hp[name] > hp then
|
||||||
|
Loading…
Reference in New Issue
Block a user