]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - builtin/game/statbars.lua
Move on join and on leave messages to lua (#4460)
[dragonfireclient.git] / builtin / game / statbars.lua
index ccc192ba4098dfe7b55a1f29d47916daa766106d..61a8b90770a9b8d5e0512445f14d3e108c65ce24 100644 (file)
@@ -7,7 +7,7 @@ local health_bar_definition =
        number = 20,
        direction = 0,
        size = { x=24, y=24 },
-       offset = { x=(-10*24)-25, y=-(48+24+10)},
+       offset = { x=(-10*24)-25, y=-(48+24+16)},
 }
 
 local breath_bar_definition =
@@ -18,7 +18,7 @@ local breath_bar_definition =
        number = 20,
        direction = 0,
        size = { x=24, y=24 },
-       offset = {x=25,y=-(48+24+10)},
+       offset = {x=25,y=-(48+24+16)},
 }
 
 local hud_ids = {}
@@ -37,6 +37,9 @@ local function initialize_builtin_statbars(player)
 
        if (hud_ids[name] == nil) then
                hud_ids[name] = {}
+               -- flags are not transmitted to client on connect, we need to make sure
+               -- our current flags are transmitted by sending them actively
+               player:hud_set_flags(player:hud_get_flags())
        end
 
        if player:hud_get_flags().healthbar and