Make players health not regenerate when on fire

This commit is contained in:
oilboi 2020-06-09 02:27:12 -04:00
parent dbde7a3809
commit a430350809

View File

@ -158,7 +158,7 @@ local function hunger_update()
local hp = player:get_hp()
--make regeneration happen every second
if meta:get_int("drowning") == 0 and hunger >= 20 and hp < 20 then
if meta:get_int("drowning") == 0 and meta:get_int("on_fire") == 0 and hunger >= 20 and hp < 20 then
local regeneration_interval = meta:get_int("regeneration_interval")
--print(regeneration_interval,"--------------------------")
regeneration_interval = regeneration_interval + 1