Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
status_effects.qc File Reference
#include "status_effects.qh"
Include dependency graph for status_effects.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool StatusEffects_active (StatusEffect this, entity actor)
void StatusEffects_apply (StatusEffect this, entity actor, float eff_time, int eff_flags)
void StatusEffects_copy (StatusEffect this, entity store, float time_offset)
float StatusEffects_gettime (StatusEffect this, entity actor)
void StatusEffects_remove (StatusEffect this, entity actor, int removal_type)
void StatusEffects_removeall (entity actor, int removal_type)
void StatusEffects_tick (entity actor)

Function Documentation

◆ StatusEffects_active()

◆ StatusEffects_apply()

void StatusEffects_apply ( StatusEffect this,
entity actor,
float eff_time,
int eff_flags )

Definition at line 29 of file status_effects.qc.

30{
31 if (!actor || eff_time <= time)
32 return;
33
34 this.m_apply(this, actor, eff_time, eff_flags);
35}
float time

References entity(), and time.

Referenced by buff_Disability_ApplyStunned(), buff_Touch(), Fire_AddDamage(), GiveBuff(), GiveItems(), GiveStatusEffect(), Item_GiveTo(), M_Mage_Defend_Shield(), M_Spider_Attack_Web_Explode(), Monster_Spawn(), nade_ice_freeze(), and PutPlayerInServer().

◆ StatusEffects_copy()

void StatusEffects_copy ( StatusEffect this,
entity store,
float time_offset )

Definition at line 37 of file status_effects.qc.

38{
39 if(!this || !store)
40 return;
41 FOREACH(StatusEffects, true,
42 {
43 if(time_offset)
44 store.statuseffect_time[it.m_id] = time + this.statuseffect_time[it.m_id] - time_offset;
45 else
46 store.statuseffect_time[it.m_id] = this.statuseffect_time[it.m_id];
47 store.statuseffect_flags[it.m_id] = this.statuseffect_flags[it.m_id];
48 });
49}
#define FOREACH(list, cond, body)
Definition iter.qh:19

References entity(), FOREACH, and time.

Referenced by CheatImpulse().

◆ StatusEffects_gettime()

float StatusEffects_gettime ( StatusEffect this,
entity actor )

Definition at line 17 of file status_effects.qc.

18{
19 entity store = actor;
20#ifdef SVQC
21 store = actor.statuseffects;
22#endif
23 if(!StatusEffects_active(this, actor))
24 return 0;
25 return store.statuseffect_time[this.m_id];
26}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
int m_id
Definition effect.qh:18
bool StatusEffects_active(StatusEffect this, entity actor)

References entity(), m_id, and StatusEffects_active().

Referenced by Fire_AddDamage(), Fire_ApplyDamage(), GiveBuff(), GiveStatusEffect(), havocbot_goalrating_enemyplayers(), Item_GiveTo(), MUTATOR_HOOKFUNCTION(), player_powerups(), powerups_DropItem(), and W_ThrowNewWeapon().

◆ StatusEffects_remove()

void StatusEffects_remove ( StatusEffect this,
entity actor,
int removal_type )

Definition at line 51 of file status_effects.qc.

52{
53 this.m_remove(this, actor, removal_type);
54}

References entity().

Referenced by Damage(), GiveBuff(), GiveStatusEffect(), invasion_SpawnChosenMonster(), player_powerups(), W_ThrowNewWeapon(), and weapon_prepareattack_do().

◆ StatusEffects_removeall()

void StatusEffects_removeall ( entity actor,
int removal_type )

Definition at line 56 of file status_effects.qc.

57{
58 if(!actor.statuseffects)
59 return;
60 FOREACH(StatusEffects, true,
61 {
62 it.m_remove(it, actor, removal_type);
63 });
64}

References entity(), and FOREACH.

Referenced by ctf_Handle_Pickup(), ctf_RespawnFlag(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), and MUTATOR_HOOKFUNCTION().

◆ StatusEffects_tick()

void StatusEffects_tick ( entity actor)

Definition at line 9 of file status_effects.qc.

10{
11 FOREACH(StatusEffects, it.m_active(it, actor),
12 {
13 it.m_tick(it, actor);
14 });
15}

References entity(), and FOREACH.

Referenced by MUTATOR_HOOKFUNCTION().