From 7e8dbab444b6e760dff9d0f732d7d4e623a1962b Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Thu, 5 Feb 2015 21:35:26 +0100 Subject: [PATCH] Come back is HUD/hunger.lua : EXHAUS' bug fixed! --- mods/hud/hunger.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mods/hud/hunger.lua b/mods/hud/hunger.lua index d26054c0..ddb0c40d 100755 --- a/mods/hud/hunger.lua +++ b/mods/hud/hunger.lua @@ -352,7 +352,7 @@ end -- player-action based hunger changes function hud.handle_node_actions(pos, oldnode, player, ext) - --[[if not player or not player:is_player() then + if not player or not player:is_player() then return end local name = player:get_player_name() @@ -368,9 +368,7 @@ function hud.handle_node_actions(pos, oldnode, player, ext) new = HUD_HUNGER_EXHAUST_MOVE end if exhaus == nil then return end - print("zerobin") - print(exhaus) -- If exhaus goes through the condition - exhaus = exhaus + new + exhaus = (exhaus or 0) + new if exhaus > HUD_HUNGER_EXHAUST_LVL then exhaus = 0 local h = tonumber(hud.hunger[name])