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

Go to the source code of this file.

Functions

void buff_Disability_ApplyStunned (entity frag_target, entity frag_attacker)
 MUTATOR_HOOKFUNCTION (buffs, MonsterMove)
 MUTATOR_HOOKFUNCTION (buffs, PlayerPhysics_UpdateStats)
 MUTATOR_HOOKFUNCTION (buffs, WeaponRateFactor)
 MUTATOR_HOOKFUNCTION (buffs, WeaponSpeedFactor)

Function Documentation

◆ buff_Disability_ApplyStunned()

void buff_Disability_ApplyStunned ( entity frag_target,
entity frag_attacker )

Definition at line 4 of file disability.qc.

5{
6 if (frag_target != frag_attacker)
8}
float time
float autocvar_g_buffs_disability_slowtime
Definition disability.qh:6
void StatusEffects_apply(StatusEffect this, entity actor, float eff_time, int eff_flags)
entity frag_target
Definition sv_ctf.qc:2321

References autocvar_g_buffs_disability_slowtime, entity(), frag_target, StatusEffects_apply(), and time.

Referenced by MUTATOR_HOOKFUNCTION().

◆ MUTATOR_HOOKFUNCTION() [1/4]

MUTATOR_HOOKFUNCTION ( buffs ,
MonsterMove  )

Definition at line 19 of file disability.qc.

20{
21 entity mon = M_ARGV(0, entity);
22
23 if (StatusEffects_active(STATUSEFFECT_Stunned, mon))
24 {
25 M_ARGV(1, float) *= autocvar_g_buffs_disability_speed; // run speed
26 M_ARGV(2, float) *= autocvar_g_buffs_disability_speed; // walk speed
27 }
28}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define M_ARGV(x, type)
Definition events.qh:17
float autocvar_g_buffs_disability_speed
Definition disability.qh:7
bool StatusEffects_active(StatusEffect this, entity actor)

References autocvar_g_buffs_disability_speed, entity(), M_ARGV, and StatusEffects_active().

◆ MUTATOR_HOOKFUNCTION() [2/4]

MUTATOR_HOOKFUNCTION ( buffs ,
PlayerPhysics_UpdateStats  )

Definition at line 10 of file disability.qc.

11{
12 entity player = M_ARGV(0, entity);
13 // these automatically reset, no need to worry
14
15 if (StatusEffects_active(STATUSEFFECT_Stunned, player))
16 STAT(MOVEVARS_HIGHSPEED, player) *= autocvar_g_buffs_disability_speed;
17}
#define STAT(...)
Definition stats.qh:82

References autocvar_g_buffs_disability_speed, entity(), M_ARGV, STAT, and StatusEffects_active().

◆ MUTATOR_HOOKFUNCTION() [3/4]

MUTATOR_HOOKFUNCTION ( buffs ,
WeaponRateFactor  )

Definition at line 30 of file disability.qc.

31{
32 entity player = M_ARGV(1, entity);
33
34 if (StatusEffects_active(STATUSEFFECT_Stunned, player))
36}
float autocvar_g_buffs_disability_attack_time_multiplier
Definition disability.qh:8

References autocvar_g_buffs_disability_attack_time_multiplier, entity(), M_ARGV, and StatusEffects_active().

◆ MUTATOR_HOOKFUNCTION() [4/4]

MUTATOR_HOOKFUNCTION ( buffs ,
WeaponSpeedFactor  )

Definition at line 37 of file disability.qc.

38{
39 entity player = M_ARGV(1, entity);
40
41 if (StatusEffects_active(STATUSEFFECT_Stunned, player))
43}
float autocvar_g_buffs_disability_weaponspeed
Definition disability.qh:9

References autocvar_g_buffs_disability_weaponspeed, entity(), M_ARGV, and StatusEffects_active().