From 5b6294b60ff99cdbb157d8b3f902a9cd77b94cfa Mon Sep 17 00:00:00 2001 From: AiTechEye <40591179+AiTechEye@users.noreply.github.com> Date: Sun, 2 Dec 2018 20:58:50 +0100 Subject: [PATCH] change player damage from punch to set_hp --- functions.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/functions.lua b/functions.lua index 0cbd91f..d55565b 100644 --- a/functions.lua +++ b/functions.lua @@ -158,9 +158,11 @@ minetest.register_globalstep(function(dtime) ptemp.temp=ptemp.temp-(math.floor(ptemp.temp-temp)*tempsurvive.speed) if ptemp.temphr then - player:punch(player,1+math.floor((ptemp.temp-ptemp.heat_resistance)*0.5),{full_punch_interval=1,damage_groups={fleshy=1}}) + --player:punch(player,1+math.floor((ptemp.temp-ptemp.heat_resistance)*0.5),{full_punch_interval=1,damage_groups={fleshy=1}}) + player:set_hp(player:get_hp()-math.floor((ptemp.temp-ptemp.heat_resistance)*0.5)) end local pt=math.floor(math.abs(ptemp.temp))