mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-26 01:30:29 +01:00
fixed typo and wrong var used
This commit is contained in:
parent
febae21e95
commit
ffd9631526
@ -12,7 +12,7 @@ local staminaHud = {}
|
|||||||
|
|
||||||
-- Lil' helping functions
|
-- Lil' helping functions
|
||||||
sprint.set_maxstamina = function(pname, mstamina)
|
sprint.set_maxstamina = function(pname, mstamina)
|
||||||
if players[pname] and mstamine > 0 then
|
if players[pname] and mstamina > 0 then
|
||||||
players[pname].maxStamina = mstamina
|
players[pname].maxStamina = mstamina
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -148,8 +148,8 @@ minetest.register_globalstep(function(dtime)
|
|||||||
playerInfo["stamina"] = playerInfo["stamina"] + dtime
|
playerInfo["stamina"] = playerInfo["stamina"] + dtime
|
||||||
end
|
end
|
||||||
-- Cap stamina at SPRINT_STAMINA
|
-- Cap stamina at SPRINT_STAMINA
|
||||||
if playerInfo["stamina"] > playerInfo["stamina"] then
|
if playerInfo["stamina"] > playerInfo["maxStamina"] then
|
||||||
playerInfo["stamina"] = playerInfo["stamina"]
|
playerInfo["stamina"] = playerInfo["maxStamina"]
|
||||||
end
|
end
|
||||||
|
|
||||||
--Update the players's hud sprint stamina bar
|
--Update the players's hud sprint stamina bar
|
||||||
|
Loading…
Reference in New Issue
Block a user