4 METHOD(Strength, m_remove, void(StatusEffects this, entity actor, int removal_type))
6 bool wasactive = (actor.statuseffects && (actor.statuseffects.statuseffect_flags[this.m_id] & STATUSEFFECT_FLAG_ACTIVE));
7 if(removal_type == STATUSEFFECT_REMOVE_TIMEOUT && wasactive && IS_PLAYER(actor))
9 //Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERDOWN_STRENGTH, actor.netname);
10 Send_Notification(NOTIF_ONE, actor, MSG_CENTER, CENTER_POWERDOWN_STRENGTH);
13 stopsound(actor, CH_TRIGGER_SINGLE); // get rid of the pickup sound
14 actor.effects &= ~(EF_BLUE | EF_ADDITIVE | EF_FULLBRIGHT);
15 SUPER(Strength).m_remove(this, actor, removal_type);
17 METHOD(Strength, m_apply, void(StatusEffects this, entity actor, float eff_time, float eff_flags))
19 bool wasactive = (actor.statuseffects && (actor.statuseffects.statuseffect_flags[this.m_id] & STATUSEFFECT_FLAG_ACTIVE));
20 if(!wasactive && IS_PLAYER(actor))
23 Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_STRENGTH, actor.netname);
24 Send_Notification(NOTIF_ONE, actor, MSG_CENTER, CENTER_POWERUP_STRENGTH);
26 SUPER(Strength).m_apply(this, actor, eff_time, eff_flags);
28 METHOD(Strength, m_tick, void(StatusEffects this, entity actor))
30 play_countdown(actor, StatusEffects_gettime(this, actor), SND_POWEROFF);
31 actor.effects |= (EF_BLUE | EF_ADDITIVE | EF_FULLBRIGHT);
32 SUPER(Strength).m_tick(this, actor);
36 METHOD(Strength, m_active, bool(StatusEffects this, entity actor))
38 if(autocvar__hud_configure)
40 return SUPER(Strength).m_active(this, actor);
42 METHOD(Strength, m_tick, void(StatusEffects this, entity actor))
47 float currentTime = (autocvar__hud_configure) ? 15 : bound(0, actor.statuseffect_time[this.m_id] - time, 99);
48 addPowerupItem(this.m_name, this.m_icon, autocvar_hud_progressbar_strength_color, currentTime, this.m_lifetime, (actor.statuseffect_flags[this.m_id] & STATUSEFFECT_FLAG_PERSISTENT));