+#include "powerups.qh"
+
+#include <common/items/_mod.qh>
+
// Powerups (#2)
// Powerup item fields (reusing existing fields)
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);
if(align < 2)
return align;
void HUD_Powerups()
{
- int allItems = getstati(STAT_ITEMS, 0, 24);
+ int allItems = STAT(ITEMS);
int allBuffs = STAT(BUFFS);
int strengthTime, shieldTime, superTime;
// Initialize items
if(!autocvar__hud_configure)
{
- if(!autocvar_hud_panel_powerups) return;
- if(spectatee_status == -1) return;
- if(getstati(STAT_HEALTH) <= 0) 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);
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;