Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
stunned.qc
Go to the documentation of this file.
1#include "stunned.qh"
2
3#ifdef SVQC
4METHOD(Stunned, m_remove, void(StatusEffect this, entity actor, int removal_type))
5{
6 actor.effects &= ~EF_SHOCK;
7 SUPER(Stunned).m_remove(this, actor, removal_type);
8}
9METHOD(Stunned, m_tick, void(StatusEffect this, entity actor))
10{
11 SUPER(Stunned).m_tick(this, actor);
12 if(!this.m_active(this, actor))
13 return;
14 if(STAT(FROZEN, actor))
15 {
16 this.m_remove(this, actor, STATUSEFFECT_REMOVE_NORMAL);
17 return;
18 }
19 actor.effects |= EF_SHOCK;
20}
21#endif
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
const int EF_SHOCK
Definition constants.qh:96
#define STAT(...)
Definition stats.qh:94
@ STATUSEFFECT_REMOVE_NORMAL
Effect is being removed by a function, calls regular removal mechanics.
Definition all.qh:28
#define SUPER(cname)
Definition oo.qh:236
#define METHOD(cname, name, prototype)
Definition oo.qh:274