1 #include "status_effects.qh"
4 bool StatusEffects_active(StatusEffects this, entity actor)
6 return this.m_active(this, actor);
9 void StatusEffects_tick(entity actor)
11 FOREACH(StatusEffect, it.m_active(it, actor),
17 float StatusEffects_gettime(StatusEffects this, entity actor)
21 store = actor.statuseffects;
24 return store.statuseffect_time[this.m_id];
28 void StatusEffects_apply(StatusEffects this, entity actor, float eff_time, int eff_flags)
30 if (!actor || eff_time <= time)
33 this.m_apply(this, actor, eff_time, eff_flags);
36 void StatusEffects_copy(StatusEffects this, entity store, float time_offset)
40 FOREACH(StatusEffect, true,
43 store.statuseffect_time[it.m_id] = time + this.statuseffect_time[it.m_id] - time_offset;
45 store.statuseffect_time[it.m_id] = this.statuseffect_time[it.m_id];
46 store.statuseffect_flags[it.m_id] = this.statuseffect_flags[it.m_id];
50 void StatusEffects_remove(StatusEffects this, entity actor, int removal_type)
52 this.m_remove(this, actor, removal_type);
55 void StatusEffects_removeall(entity actor, int removal_type)
57 if(!actor.statuseffects)
59 FOREACH(StatusEffect, true,
61 it.m_remove(it, actor, removal_type);