mirror of
https://github.com/minetest-mods/hbsprint.git
synced 2025-01-09 09:30:39 +01:00
Don't drain hunger for players with fast privilege (#29)
This commit is contained in:
parent
899d246832
commit
1fe580a210
2
init.lua
2
init.lua
@ -237,7 +237,7 @@ local function sprint_step(player, dtime)
|
|||||||
if (player_stamina > 0 and hunger > starve_limit and ground) or fast then
|
if (player_stamina > 0 and hunger > starve_limit and ground) or fast then
|
||||||
start_sprint(player)
|
start_sprint(player)
|
||||||
if stamina and not fast then drain_stamina(player) end
|
if stamina and not fast then drain_stamina(player) end
|
||||||
if starve then drain_hunger(player, name) end
|
if starve and not fast then drain_hunger(player, name) end
|
||||||
if breath and not fast and breath_timer[name] >= 2 then
|
if breath and not fast and breath_timer[name] >= 2 then
|
||||||
drain_breath(player)
|
drain_breath(player)
|
||||||
breath_timer[name] = 0
|
breath_timer[name] = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user