1 #include "superweapons.qh"
4 METHOD(Superweapons, m_active, bool(StatusEffects this, entity actor))
6 if(autocvar__hud_configure)
8 return SUPER(Superweapons).m_active(this, actor);
10 METHOD(Superweapons, m_tick, void(StatusEffects this, entity actor))
15 int allItems = STAT(ITEMS);
17 // Prevent stuff to show up on mismatch that will be fixed next frame
18 if(!(allItems & IT_SUPERWEAPON) && !autocvar__hud_configure)
21 if(allItems & IT_UNLIMITED_SUPERWEAPONS)
24 float currentTime = (autocvar__hud_configure) ? 13 : bound(0, actor.statuseffect_time[this.m_id] - time, 99);
25 addPowerupItem(this.m_name, this.m_icon, autocvar_hud_progressbar_superweapons_color, currentTime, this.m_lifetime, (actor.statuseffect_flags[this.m_id] & STATUSEFFECT_FLAG_PERSISTENT));