Replenish stamina on respawn
This commit is contained in:
parent
8b41008bc1
commit
0a8f7233ee
1 changed files with 4 additions and 1 deletions
|
@ -111,10 +111,13 @@ minetest.register_on_joinplayer(function(player)
|
|||
})
|
||||
end
|
||||
|
||||
|
||||
players[player:get_player_name()] = info
|
||||
end)
|
||||
|
||||
minetest.register_on_respawnplayer(function(player)
|
||||
players[player:get_player_name()].stamina = STAMINA_MAX
|
||||
end)
|
||||
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
players[player:get_player_name()] = nil
|
||||
end)
|
||||
|
|
Loading…
Reference in a new issue