X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud%2Fpanel%2Fpowerups.qc;h=947bfd53b3ee1075063b72a489ece3b981811753;hb=5a95a7be13adcf53cc5aedb89ac41c5416fb4304;hp=7c454f9f9001ff695115234408f7c571f8d93a25;hpb=7785114f6fb42a3a52c39413bf6e725607d338b2;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud/panel/powerups.qc b/qcsrc/client/hud/panel/powerups.qc index 7c454f9f90..947bfd53b3 100644 --- a/qcsrc/client/hud/panel/powerups.qc +++ b/qcsrc/client/hud/panel/powerups.qc @@ -1,5 +1,8 @@ #include "powerups.qh" +#include +#include +#include #include // Powerups (#2) @@ -44,7 +47,7 @@ void addPowerupItem(string name, string icon, vector color, float currentTime, f int getPowerupItemAlign(int align, int column, int row, int columns, int rows, bool isVertical) { - TC(int, align); TC(int, column); TC(int, row); TC(int, columns); TC(int, rows); TC(bool, isVertical); + TC(int, align); TC(int, column); TC(int, row); TC(int, columns); TC(int, rows); TC(bool, isVertical); if(align < 2) return align; @@ -63,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) @@ -72,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); @@ -167,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; @@ -178,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)