#include "speed.qh" #ifdef SVQC METHOD(Speed, m_remove, void(StatusEffects this, entity actor, int removal_type)) { bool wasactive = (actor.statuseffects && (actor.statuseffects.statuseffect_flags[this.m_id] & STATUSEFFECT_FLAG_ACTIVE)); if(removal_type == STATUSEFFECT_REMOVE_TIMEOUT && wasactive && IS_PLAYER(actor)) { //Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERDOWN_SPEED, actor.netname); Send_Notification(NOTIF_ONE, actor, MSG_CENTER, CENTER_POWERDOWN_SPEED); } if(wasactive) stopsound(actor, CH_TRIGGER_SINGLE); // get rid of the pickup sound SUPER(Speed).m_remove(this, actor, removal_type); } METHOD(Speed, m_apply, void(StatusEffects this, entity actor, float eff_time, float eff_flags)) { bool wasactive = (actor.statuseffects && (actor.statuseffects.statuseffect_flags[this.m_id] & STATUSEFFECT_FLAG_ACTIVE)); if(!wasactive && IS_PLAYER(actor)) { if(!g_cts) Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_SPEED, actor.netname); Send_Notification(NOTIF_ONE, actor, MSG_CENTER, CENTER_POWERUP_SPEED); } SUPER(Speed).m_apply(this, actor, eff_time, eff_flags); } METHOD(Speed, m_tick, void(StatusEffects this, entity actor)) { play_countdown(actor, StatusEffects_gettime(this, actor), SND_POWEROFF); SUPER(Speed).m_tick(this, actor); } #endif