mirror of
https://github.com/a-bad-dev/simple-shooter-game.git
synced 2026-06-08 20:12:11 +00:00
don't attempt to heal dead players
This commit is contained in:
parent
16cdefe3be
commit
3328ebe010
1 changed files with 1 additions and 1 deletions
|
|
@ -6,7 +6,7 @@ core.register_globalstep(function(dtime)
|
|||
if timer >= 10 then
|
||||
timer = 0
|
||||
for _, player in pairs(core.get_connected_players()) do
|
||||
if alive_players[player:get_player_name()] == "alive" then
|
||||
if alive_players[player:get_player_name()] == "alive" and player:get_hp() > 0 then
|
||||
player:set_hp(math.min(player:get_hp() + 2, 20))
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue