X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud%2Fpanel%2Fpowerups.qc;h=dd574cf9b039c4b69d6654792a36525e7c54ba57;hb=4096ab0591cbd7fac803e022375cd3c221511d8b;hp=3b34be0f69bd53063f441f440b8cb083992443ad;hpb=3d632e50853d7bf6e499fc4400e5f4254ad54a1c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud/panel/powerups.qc b/qcsrc/client/hud/panel/powerups.qc index 3b34be0f6..dd574cf9b 100644 --- a/qcsrc/client/hud/panel/powerups.qc +++ b/qcsrc/client/hud/panel/powerups.qc @@ -1,7 +1,9 @@ #include "powerups.qh" -#include "scoreboard.qh" -#include +#include +#include +#include +#include // Powerups (#2) @@ -64,7 +66,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) @@ -73,7 +75,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); @@ -110,9 +112,8 @@ void HUD_Powerups() return; // Draw panel background - if(1 - scoreboard_fade_alpha <= 0) - return; - HUD_Panel_LoadCvars(1 - scoreboard_fade_alpha); + HUD_Panel_LoadCvars(); + if (autocvar_hud_panel_powerups_dynamichud) HUD_Scale_Enable(); else @@ -169,7 +170,7 @@ void HUD_Powerups() // Draw items from linked list vector itemPos = pos; - vector itemSize = eX * (size.x / columns) + eY * (size.y / rows); + vector itemSize = vec2(size.x / columns, size.y / rows); vector textColor = '1 1 1'; int fullSeconds = 0; @@ -180,7 +181,7 @@ void HUD_Powerups() draw_beginBoldFont(); for(entity item = powerupItems; item.count; item = item.chain) { - itemPos = eX * (pos.x + column * itemSize.x) + eY * (pos.y + row * itemSize.y); + itemPos = vec2(pos.x + column * itemSize.x, pos.y + row * itemSize.y); // Draw progressbar if(autocvar_hud_panel_powerups_progressbar)