develop #32

Merged
milan merged 7 commits from develop into master 2021-02-28 22:06:32 +01:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 34c8058b8a - Show all commits

View file

@ -81,7 +81,7 @@ stepheight = 0.6,
return return
end 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") minetest.add_item(pos, "mobs:egg")

View file

@ -405,13 +405,13 @@ local function stamina_globaltimer(dtime)
local name = player:get_player_name() local name = player:get_player_name()
-- damage player by 1 hp if saturation is < 2 (of 30) -- 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 and hp > 0 then
player:set_hp(hp - STAMINA_STARVE, {hunger = true}) player:set_hp(hp - STAMINA_STARVE, {hunger = true})
end end
-- don't heal if drowning or dead or poisoned -- 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 h >= hp
and hp > 0 and hp > 0
and air > 0 and air > 0