1
0
mirror of https://repo.or.cz/minetest_hbarmor.git synced 2025-02-08 08:10:24 +01:00

Fix fail when damaged with 6 new armor pieces

This commit is contained in:
Wuzzy 2016-08-05 20:08:11 +02:00
parent 3d36b82a00
commit 556f91b5c6

View File

@ -31,7 +31,7 @@ function hbarmor.set_armor(player_name, ges_state, items)
lvl = 0 lvl = 0
end end
hbarmor.armor[player_name] = lvl* (items * (100 / max_items)) hbarmor.armor[player_name] = math.min(lvl* (items * (100 / max_items)), 100)
end end