fix hudbars define empty player name "" in hb.players table and show permanently error log

This commit is contained in:
crabman77 2016-03-05 18:04:16 +01:00
parent c54bdbef03
commit a23fc44e6d
1 changed files with 3 additions and 1 deletions

View File

@ -335,9 +335,11 @@ local function update_hud(player)
end
minetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
if not name or name == "" then return end
hide_builtin(player)
custom_hud(player)
hb.players[player:get_player_name()] = player
hb.players[name] = player
end)
minetest.register_on_leaveplayer(function(player)