1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-24 17:50:37 +01:00

Prevent crash when breath is nil (connection error)

This commit is contained in:
LeMagnesium 2015-07-26 15:22:07 +02:00
parent b07591066e
commit f9f98e3a9c

View File

@ -320,7 +320,7 @@ local function update_hud(player)
if breath == 11 then if breath == 11 then
hb.hide_hudbar(player, "breath") hb.hide_hudbar(player, "breath")
else elseif breath then
hb.unhide_hudbar(player, "breath") hb.unhide_hudbar(player, "breath")
hb.change_hudbar(player, "breath", math.min(breath, 10)) hb.change_hudbar(player, "breath", math.min(breath, 10))
end end