Armor hud doesn't show on_join when it should
Closed this issue · 1 comments
p5yg3n commented
I changed these lines and it fixed it.
local a = 0
if hud.armor[name] > 0 then a = 20 end
armor_hud_bg[name] = player:hud_add({
hud_elem_type = "statbar",
position = HUD_ARMOR_POS,
size = HUD_SIZE,
text = "hud_armor_bg.png",
number = a,
alignment = {x=-1,y=-1},
offset = HUD_ARMOR_OFFSET,
})
armor_hud[name] = player:hud_add({
hud_elem_type = "statbar",
position = HUD_ARMOR_POS,
size = HUD_SIZE,
text = "hud_armor_fg.png",
number = hud.armor[name],
alignment = {x=-1,y=-1},
offset = HUD_ARMOR_OFFSET,
})
Without changing this line it still wouldn't work. https://github.com/BlockMen/hud/blob/master/init.lua#L266
minetest.after(2.5, function()
p5yg3n commented
I submitted a pull request here: https://github.com/BlockMen/hud/pull/13 so I'm closing this issue.