mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 20:41:11 +01:00
Don't decrease hunger if saturation down from < 1
This commit is contained in:
parent
5252409326
commit
22b8ba6440
1 changed files with 1 additions and 2 deletions
|
@ -150,8 +150,7 @@ function mcl_hunger.exhaust(playername, increase)
|
||||||
if mcl_hunger.saturation[playername] > 0.0 then
|
if mcl_hunger.saturation[playername] > 0.0 then
|
||||||
mcl_hunger.saturation[playername] = math.max(mcl_hunger.saturation[playername] - 1.0, 0.0)
|
mcl_hunger.saturation[playername] = math.max(mcl_hunger.saturation[playername] - 1.0, 0.0)
|
||||||
satuchanged = true
|
satuchanged = true
|
||||||
end
|
elseif mcl_hunger.saturation[playername] < 0.0001 then
|
||||||
if mcl_hunger.saturation[playername] < 0.0001 then
|
|
||||||
h = mcl_hunger.get_hunger_raw(player)
|
h = mcl_hunger.get_hunger_raw(player)
|
||||||
h = h-1
|
h = h-1
|
||||||
mcl_hunger.hunger[playername] = h
|
mcl_hunger.hunger[playername] = h
|
||||||
|
|
Loading…
Reference in a new issue