]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/powerups.qc
Merge branch 'master' into Mario/overkill
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / powerups.qc
index 4779ab747999365cf458f889304a06893484cdef..076ce918f14723dcde2e755308a3f4379fb885e0 100644 (file)
@@ -63,7 +63,7 @@ void HUD_Powerups()
 {
        int allItems = STAT(ITEMS);
        int allBuffs = STAT(BUFFS);
-       int strengthTime, shieldTime, superTime;
+       float strengthTime, shieldTime, superTime;
 
        // Initialize items
        if(!autocvar__hud_configure)
@@ -72,7 +72,7 @@ void HUD_Powerups()
                        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;
+               //if(!(allItems & (ITEM_Strength.m_itemid | ITEM_Shield.m_itemid | IT_SUPERWEAPON)) && !allBuffs) return;
 
                strengthTime = bound(0, STAT(STRENGTH_FINISHED) - time, 99);
                shieldTime = bound(0, STAT(INVINCIBLE_FINISHED) - time, 99);
@@ -109,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;