Reset hp on leave/join

This commit is contained in:
rubenwardy 2015-12-08 19:24:41 +00:00
parent 11b1866e88
commit 1c28177fb9

View file

@ -10,5 +10,8 @@ function give_initial_stuff(player)
end end
end end
minetest.register_on_joinplayer(give_initial_stuff) minetest.register_on_joinplayer(function(player)
player:set_hp(20)
give_initial_stuff(player)
end)
minetest.register_on_respawnplayer(give_initial_stuff) minetest.register_on_respawnplayer(give_initial_stuff)