]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/powerups.qc
Merge branch 'master' into terencehill/bot_fix
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / powerups.qc
index dd4c0597ebb643ea10e20e42310caa9df9d8e035..076ce918f14723dcde2e755308a3f4379fb885e0 100644 (file)
@@ -1,6 +1,6 @@
 #include "powerups.qh"
 
-#include <common/items/all.qc>
+#include <common/items/_mod.qh>
 
 // Powerups (#2)
 
@@ -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,9 +109,8 @@ void HUD_Powerups()
                return;
 
        // Draw panel background
-       if(1 - scoreboard_fade_alpha <= 0)
-               return;
-       HUD_Panel_UpdateCvars(1 - scoreboard_fade_alpha);
+       HUD_Panel_LoadCvars();
+
        if (autocvar_hud_panel_powerups_dynamichud)
                HUD_Scale_Enable();
        else