mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 16:11:06 +01:00
Do not allow negative hunger
This commit is contained in:
parent
c328a9b1bc
commit
690e81c0fe
1 changed files with 1 additions and 1 deletions
|
@ -152,7 +152,7 @@ function mcl_hunger.exhaust(playername, increase)
|
|||
satuchanged = true
|
||||
elseif mcl_hunger.saturation[playername] < 0.0001 then
|
||||
h = mcl_hunger.get_hunger_raw(player)
|
||||
h = h-1
|
||||
h = math.max(h-1, 0)
|
||||
mcl_hunger.hunger[playername] = h
|
||||
mcl_hunger.set_hunger_raw(player)
|
||||
satuchanged = true
|
||||
|
|
Loading…
Reference in a new issue