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
|
end
|
||||||
|
|
||||||
|
|
||||||
players[player:get_player_name()] = info
|
players[player:get_player_name()] = info
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
minetest.register_on_respawnplayer(function(player)
|
||||||
|
players[player:get_player_name()].stamina = STAMINA_MAX
|
||||||
|
end)
|
||||||
|
|
||||||
minetest.register_on_leaveplayer(function(player)
|
minetest.register_on_leaveplayer(function(player)
|
||||||
players[player:get_player_name()] = nil
|
players[player:get_player_name()] = nil
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in a new issue