X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud%2Fpanel%2Fpowerups.qc;h=076ce918f14723dcde2e755308a3f4379fb885e0;hb=b834eab77489d98d5d722d67c8a96cf6c3549436;hp=31a00794e3ed7977c2eb4bb04480831a2791191b;hpb=42e255d014f2c6a1871177ea511f630624cdfb57;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud/panel/powerups.qc b/qcsrc/client/hud/panel/powerups.qc index 31a00794e..076ce918f 100644 --- a/qcsrc/client/hud/panel/powerups.qc +++ b/qcsrc/client/hud/panel/powerups.qc @@ -1,6 +1,6 @@ #include "powerups.qh" -#include +#include // Powerups (#2) @@ -63,15 +63,16 @@ 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) { - if(!autocvar_hud_panel_powerups) return; - if(spectatee_status == -1) return; - if(STAT(HEALTH) <= 0) return; - if(!(allItems & (ITEM_Strength.m_itemid | ITEM_Shield.m_itemid | IT_SUPERWEAPON)) && !allBuffs) 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); shieldTime = bound(0, STAT(INVINCIBLE_FINISHED) - time, 99); @@ -108,8 +109,13 @@ void HUD_Powerups() return; // Draw panel background - HUD_Panel_UpdateCvars(); - HUD_Panel_DrawBg(1); + HUD_Panel_LoadCvars(); + + if (autocvar_hud_panel_powerups_dynamichud) + HUD_Scale_Enable(); + else + HUD_Scale_Disable(); + HUD_Panel_DrawBg(); // Set drawing area vector pos = panel_pos;