#include "powerups.qh"
-#include <common/items/all.qc>
+#include <client/autocvars.qh>
+#include <client/defs.qh>
+#include <client/miscfunctions.qh>
+#include <common/items/_mod.qh>
// Powerups (#2)
{
int allItems = STAT(ITEMS);
int allBuffs = STAT(BUFFS);
- int strengthTime, shieldTime, superTime;
+ float strengthTime, shieldTime, superTime;
// Initialize items
if(!autocvar__hud_configure)
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);
// 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;
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)