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