summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2015-06-28 14:28:47 +0200
committerWuzzy <almikes@aol.com>2015-06-28 14:28:47 +0200
commit6a1c5d439af7d02865d52b732a57e88d6e0151a3 (patch)
treed42d3d3caf4a7bd70757feed8a32153379741956
parentb67ae1764fc95ffdebbcd248472778538736909e (diff)
Fix exhaus bug
-rw-r--r--hunger.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/hunger.lua b/hunger.lua
index 7ac0fe6..1d82ca1 100644
--- a/hunger.lua
+++ b/hunger.lua
@@ -380,7 +380,7 @@ function hbhunger.handle_node_actions(pos, oldnode, player, ext)
if not pos and not oldnode then
new = HUNGER_EXHAUST_MOVE
end
- exhaus = exhaus + new
+ exhaus = (exhaus or 0) + new
if exhaus > HUNGER_EXHAUST_LVL then
exhaus = 0
local h = tonumber(hbhunger.hunger[name])