summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlockMen <nmuelll@web.de>2013-09-03 14:17:28 +0200
committerBlockMen <nmuelll@web.de>2013-09-03 14:17:28 +0200
commit030f30d47e4042225f85b7dbe491aba6d4f59435 (patch)
tree8f2c59b3dfc7af0ccd5d7e3bfc55cb26faefef6d
parent2e6127b42bdd571e30114fe4316d464fcea88fc6 (diff)
Enable damage when hunger is 0
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 8e9597c..e7fd6b3 100644
--- a/init.lua
+++ b/init.lua
@@ -161,7 +161,7 @@ minetest.after(2.5, function()
if HUD_ENABLE_HUNGER and timer > 4 then
if h>=16 then
player:set_hp(player:get_hp()+1)
- elseif h==1 and minetest.setting_getbool("enable_damage") then
+ elseif h<=1 and minetest.setting_getbool("enable_damage") then
if player:get_hp()-1 >= 1 then player:set_hp(player:get_hp()-1) end
end
end