X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud.qh;h=1fe76b091cc2239684a1a420d1e5ee95108b8a8e;hb=04ab0ff7c3c5fcfe9780eadccfd5abd03d25b181;hp=19cd36ddb0b0551bd4bc6833ef5b73f8be5da9d4;hpb=2bb2db9c0f8016645a23381d7493588d748ecacf;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud.qh b/qcsrc/client/hud.qh index 19cd36ddb..1fe76b091 100644 --- a/qcsrc/client/hud.qh +++ b/qcsrc/client/hud.qh @@ -132,7 +132,7 @@ float current_player; hud_panelent.panel_draw = ##draw_func; \ ++HUD_PANEL_NUM; \ } \ - ACCUMULATE_FUNCTION(RegisterHUD_Panels, RegisterHUD_Panel_##NAME) + ACCUMULATE_FUNCTION(RegisterHUD_Panels, RegisterHUD_Panel_##NAME); HUD_PANELS #undef HUD_PANEL @@ -340,8 +340,13 @@ if(panel.update_time <= time) { \ } \ panel.current_panel_pos = panel_pos; \ panel.current_panel_size = panel_size; \ - if(panel.current_panel_bg != "") \ + if(panel.current_panel_bg) \ strunzone(panel.current_panel_bg); \ + if(panel_bg == "")\ + {\ + /*print(sprintf("^xf08 %s panel: panel_bg is empty\n", panel.panel_name));*/\ + panel_bg = "0";\ + }\ panel.current_panel_bg = strzone(panel_bg); \ panel.current_panel_bg_alpha = panel_bg_alpha; \ panel.current_panel_bg_border = panel_bg_border; \ @@ -354,6 +359,11 @@ if(panel.update_time <= time) { \ panel_pos = panel.current_panel_pos; \ panel_size = panel.current_panel_size; \ panel_bg = panel.current_panel_bg; \ + if(panel.current_panel_bg == "")\ + {\ + /*print(sprintf("^xf08 %s panel: panel.current_panel_bg is empty\n", panel.panel_name));*/\ + panel_bg = "0";\ + }\ panel_bg_alpha = panel.current_panel_bg_alpha; \ panel_bg_border = panel.current_panel_bg_border; \ panel_bg_color = panel.current_panel_bg_color; \