mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-19 01:21:05 +01:00
Upgrade hbarmor mod to version 0.3.0
This commit is contained in:
parent
04daa1295b
commit
1a427824a9
2 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
# HUD bar for `3d_armor` [`hbarmor`]
|
||||
|
||||
* Version: 0.2.0
|
||||
* Version: 0.3.0
|
||||
|
||||
## Description
|
||||
This mod adds a simple HUD bar which displays the current damage
|
||||
|
|
|
@ -93,7 +93,7 @@ function hbarmor.set_armor(player_name, ges_state, items)
|
|||
lvl = 0
|
||||
end
|
||||
|
||||
hbarmor.armor[player_name] = math.min(lvl* (items * (100 / max_items)), 100)
|
||||
hbarmor.armor[player_name] = math.max(0, math.min(lvl* (items * (100 / max_items)), 100))
|
||||
end
|
||||
|
||||
-- update hud elemtens if value has changed
|
||||
|
|
Loading…
Reference in a new issue