mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-12-23 01:12:21 +01:00
Display correct heal attribute level, fixes #137
This commit is contained in:
parent
cc6fff2b04
commit
21716ffd31
@ -270,7 +270,8 @@ armor.set_player_armor = function(self, player)
|
||||
change[group] = groups[group] / base
|
||||
end
|
||||
for _, attr in pairs(self.attributes) do
|
||||
self.def[name][attr] = attributes[attr]
|
||||
local mult = attr == "heal" and self.config.heal_multiplier or 1
|
||||
self.def[name][attr] = attributes[attr] * mult
|
||||
end
|
||||
for _, phys in pairs(self.physics) do
|
||||
self.def[name][phys] = physics[phys]
|
||||
|
@ -323,7 +323,6 @@ minetest.register_on_player_hpchange(function(player, hp_change)
|
||||
local name = player:get_player_name()
|
||||
if name then
|
||||
local heal = armor.def[name].heal
|
||||
heal = heal * armor.config.heal_multiplier
|
||||
if heal >= math.random(100) then
|
||||
hp_change = 0
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user