Fix stamina bar not reset correctly
This commit is contained in:
parent
8fe61c0bb6
commit
4245fe355f
2
init.lua
2
init.lua
@ -35,7 +35,7 @@ local function change_stamina_max(player, value)
|
|||||||
if val > new_max then
|
if val > new_max then
|
||||||
player:get_meta():set_float("hbsprint:stamina", new_max)
|
player:get_meta():set_float("hbsprint:stamina", new_max)
|
||||||
hb.change_hudbar(player, "stamina", new_max, new_max)
|
hb.change_hudbar(player, "stamina", new_max, new_max)
|
||||||
elseif val < new_max then
|
elseif val <= new_max then
|
||||||
hb.unhide_hudbar(player, "stamina")
|
hb.unhide_hudbar(player, "stamina")
|
||||||
hb.change_hudbar(player, "stamina", nil, new_max)
|
hb.change_hudbar(player, "stamina", nil, new_max)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user