]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/powerups.qc
Merge branch 'master' into terencehill/hud_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / powerups.qc
index 223bf72ce8efae4a679f8c6405673deaf1aac283..7c454f9f9001ff695115234408f7c571f8d93a25 100644 (file)
@@ -1,6 +1,6 @@
 #include "powerups.qh"
 
-#include <common/items/all.qc>
+#include <common/items/_mod.qh>
 
 // Powerups (#2)
 
@@ -68,9 +68,10 @@ void HUD_Powerups()
        // Initialize items
        if(!autocvar__hud_configure)
        {
-               if(!autocvar_hud_panel_powerups) return;
-               if(spectatee_status == -1) return;
-               if(STAT(HEALTH) <= 0) return;
+               if((!autocvar_hud_panel_powerups) || (spectatee_status == -1))
+                       return;
+               if(STAT(HEALTH) <= 0 && autocvar_hud_panel_powerups_hide_ondeath)
+                       return;
                if(!(allItems & (ITEM_Strength.m_itemid | ITEM_Shield.m_itemid | IT_SUPERWEAPON)) && !allBuffs) return;
 
                strengthTime = bound(0, STAT(STRENGTH_FINISHED) - time, 99);
@@ -108,12 +109,13 @@ void HUD_Powerups()
                return;
 
        // Draw panel background
-       HUD_Panel_UpdateCvars();
+       HUD_Panel_LoadCvars();
+
        if (autocvar_hud_panel_powerups_dynamichud)
                HUD_Scale_Enable();
        else
                HUD_Scale_Disable();
-       HUD_Panel_DrawBg(1);
+       HUD_Panel_DrawBg();
 
        // Set drawing area
        vector pos = panel_pos;