forked from mtcontrib/minetest_hbarmor
Fix fail when damaged with 6 new armor pieces
This commit is contained in:
parent
3d36b82a00
commit
556f91b5c6
@ -31,7 +31,7 @@ function hbarmor.set_armor(player_name, ges_state, items)
|
||||
lvl = 0
|
||||
end
|
||||
|
||||
hbarmor.armor[player_name] = lvl* (items * (100 / max_items))
|
||||
hbarmor.armor[player_name] = math.min(lvl* (items * (100 / max_items)), 100)
|
||||
|
||||
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user