dont apply starvation damage if already dead

main
TenPlus1 2019-07-17 12:55:42 +01:00
parent fa04ff3fdc
commit 0f57240fd1
1 changed files with 2 additions and 1 deletions

View File

@ -380,7 +380,8 @@ 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 then
if h < STAMINA_STARVE_LVL
and hp > 0 then
player:set_hp(hp - STAMINA_STARVE)
end