forked from mtcontrib/minetest_hbhunger
Fix exhaus bug
This commit is contained in:
parent
b67ae1764f
commit
6a1c5d439a
@ -380,7 +380,7 @@ function hbhunger.handle_node_actions(pos, oldnode, player, ext)
|
|||||||
if not pos and not oldnode then
|
if not pos and not oldnode then
|
||||||
new = HUNGER_EXHAUST_MOVE
|
new = HUNGER_EXHAUST_MOVE
|
||||||
end
|
end
|
||||||
exhaus = exhaus + new
|
exhaus = (exhaus or 0) + new
|
||||||
if exhaus > HUNGER_EXHAUST_LVL then
|
if exhaus > HUNGER_EXHAUST_LVL then
|
||||||
exhaus = 0
|
exhaus = 0
|
||||||
local h = tonumber(hbhunger.hunger[name])
|
local h = tonumber(hbhunger.hunger[name])
|
||||||
|
Loading…
Reference in New Issue
Block a user