From 76fa8ccef3b2347bad655a21de22a0f507431450 Mon Sep 17 00:00:00 2001 From: Vitaliy Olkhin Date: Wed, 30 Oct 2024 11:39:02 +0500 Subject: [PATCH] update --- init.lua | 7 ++++--- mod.conf | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 27e1e5f..e3953d8 100644 --- a/init.lua +++ b/init.lua @@ -1,8 +1,9 @@ minetest.register_on_respawnplayer(function(player) - if player:get_hp() == 0 then - local name = player:get_player_name() + local name = player:get_player_name() + minetest.log("action", "respawn_patch: " .. name .. ", get_hp(): " .. player:get_hp()) + + if player:get_hp() < 1 then player:set_hp(20) minetest.log("action", "respawn_patch: " .. name .. " restoration of life") - minetest.chat_send_all(dump(player:get_hp())) end end) diff --git a/mod.conf b/mod.conf index 612a40a..21b46cb 100644 --- a/mod.conf +++ b/mod.conf @@ -1,2 +1,3 @@ name=respawn_patch description = Test patch to solve the respawn issue +author = VinAdmin volkhin@texnoblog.uz