update
This commit is contained in:
parent
49c523762c
commit
76fa8ccef3
7
init.lua
7
init.lua
@ -1,8 +1,9 @@
|
|||||||
minetest.register_on_respawnplayer(function(player)
|
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)
|
player:set_hp(20)
|
||||||
minetest.log("action", "respawn_patch: " .. name .. " restoration of life")
|
minetest.log("action", "respawn_patch: " .. name .. " restoration of life")
|
||||||
minetest.chat_send_all(dump(player:get_hp()))
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user