diff --git a/mods/hbhunger/init.lua b/mods/hbhunger/init.lua index d6527031..1a3a7540 100755 --- a/mods/hbhunger/init.lua +++ b/mods/hbhunger/init.lua @@ -101,14 +101,14 @@ minetest.register_globalstep(function(dtime) main_timer = main_timer + dtime timer = timer + dtime timer2 = timer2 + dtime - if main_timer > HUNGER_HUD_TICK or timer > 4 or timer2 > HUNGER_HUNGER_TICK then + if main_timer > HUNGER_HUD_TICK or timer > 10 or timer2 > HUNGER_HUNGER_TICK then if main_timer > HUNGER_HUD_TICK then main_timer = 0 end for _,player in ipairs(minetest.get_connected_players()) do local name = player:get_player_name() local h = tonumber(hbhunger.hunger[name]) local hp = player:get_hp() - if timer > 4 then + if timer > 10 then -- heal player by 1 hp if not dead and satiation is > 15 (of 30) if h > 15 and hp > 0 and player:get_breath() > 0 then player:set_hp(hp+1) @@ -136,7 +136,7 @@ minetest.register_globalstep(function(dtime) end end end - if timer > 4 then timer = 0 end + if timer > 10 then timer = 0 end if timer2 > HUNGER_HUNGER_TICK then timer2 = 0 end end)