]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/mutators/mutator/powerups/powerup/speed.qc
Disable the bubbly particles that show while holding the Speed powerup, as the effect...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / powerups / powerup / speed.qc
1 #include "speed.qh"
2
3 #ifdef SVQC
4 METHOD(Speed, m_remove, void(StatusEffects this, entity actor, int removal_type))
5 {
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))
8     {
9         //Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERDOWN_SPEED, actor.netname);
10         Send_Notification(NOTIF_ONE, actor, MSG_CENTER, CENTER_POWERDOWN_SPEED);
11     }
12     if(wasactive)
13         stopsound(actor, CH_TRIGGER_SINGLE); // get rid of the pickup sound
14     SUPER(Speed).m_remove(this, actor, removal_type);
15 }
16 METHOD(Speed, m_apply, void(StatusEffects this, entity actor, float eff_time, float eff_flags))
17 {
18     bool wasactive = (actor.statuseffects && (actor.statuseffects.statuseffect_flags[this.m_id] & STATUSEFFECT_FLAG_ACTIVE));
19     if(!wasactive && IS_PLAYER(actor))
20     {
21         if(!g_cts)
22             Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_SPEED, actor.netname);
23         Send_Notification(NOTIF_ONE, actor, MSG_CENTER, CENTER_POWERUP_SPEED);
24     }
25     SUPER(Speed).m_apply(this, actor, eff_time, eff_flags);
26 }
27 METHOD(Speed, m_tick, void(StatusEffects this, entity actor))
28 {
29     play_countdown(actor, StatusEffects_gettime(this, actor), SND_POWEROFF);
30     SUPER(Speed).m_tick(this, actor);
31 }
32 #endif