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}
9#if 0
10// TODO: some infinite source of stunning? e.g. some electric current
11METHOD(Stunned, m_persistent, bool(StatusEffect this, entity actor))
12{
13 return true;
14}
15#endif
16METHOD(Stunned, m_tick, void(StatusEffect this, entity actor))
17{
18 if(STAT(FROZEN, actor))
19 {
20 this.m_remove(this, actor, STATUSEFFECT_REMOVE_NORMAL);
21 return;
22 }
23 //Shock_ApplyDamage(actor);
24 actor.effects |= EF_SHOCK;
25 SUPER(Stunned).m_tick(this, actor);
26}
27#endif
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
const int EF_SHOCK
Definition constants.qh:103
#define STAT(...)
Definition stats.qh:82
@ STATUSEFFECT_REMOVE_NORMAL
Effect is being removed by a function, calls regular removal mechanics.
Definition all.qh:28
#define SUPER(cname)
Definition oo.qh:231
#define METHOD(cname, name, prototype)
Definition oo.qh:269