From 34c8058b8a01bb29bc18b9544c062ba2806a953f Mon Sep 17 00:00:00 2001 From: root Date: Wed, 10 Feb 2021 09:40:32 +0100 Subject: [PATCH] update --- mods/mobs_animal/chicken.lua | 2 +- mods/stamina/init.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/mobs_animal/chicken.lua b/mods/mobs_animal/chicken.lua index ad552408..2c3b4484 100644 --- a/mods/mobs_animal/chicken.lua +++ b/mods/mobs_animal/chicken.lua @@ -81,7 +81,7 @@ stepheight = 0.6, return end - local pos = self.object:get_pos() + local pos = self.object:get_pos() ; if not pos then return end minetest.add_item(pos, "mobs:egg") diff --git a/mods/stamina/init.lua b/mods/stamina/init.lua index cdccd884..8678831a 100644 --- a/mods/stamina/init.lua +++ b/mods/stamina/init.lua @@ -405,13 +405,13 @@ local function stamina_globaltimer(dtime) local name = player:get_player_name() -- damage player by 1 hp if saturation is < 2 (of 30) - if h < STAMINA_STARVE_LVL + if h and h < STAMINA_STARVE_LVL and hp > 0 then player:set_hp(hp - STAMINA_STARVE, {hunger = true}) end -- don't heal if drowning or dead or poisoned - if h >= STAMINA_HEAL_LVL + if h and h >= STAMINA_HEAL_LVL and h >= hp and hp > 0 and air > 0