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

Go to the source code of this file.

Functions

float buff_Medic_CalculateSurviveDamage (float frag_damage, float health)
 MUTATOR_HOOKFUNCTION (buffs, PlayerRegen)

Function Documentation

◆ buff_Medic_CalculateSurviveDamage()

float buff_Medic_CalculateSurviveDamage ( float frag_damage,
float health )

Definition at line 16 of file medic.qc.

17{
20 return frag_damage;
21}
float autocvar_g_buffs_medic_survive_health
Definition medic.qh:7
float autocvar_g_buffs_medic_survive_chance
Definition medic.qh:6
float random(void)
float max(float f,...)
float health
Legacy fields for the resources. To be removed.
Definition resources.qh:9
float frag_damage
Definition sv_ctf.qc:2322

References autocvar_g_buffs_medic_survive_chance, autocvar_g_buffs_medic_survive_health, frag_damage, health, max(), and random().

Referenced by MUTATOR_HOOKFUNCTION().

◆ MUTATOR_HOOKFUNCTION()

MUTATOR_HOOKFUNCTION ( buffs ,
PlayerRegen  )

Definition at line 4 of file medic.qc.

5{
6 entity player = M_ARGV(0, entity);
7
8 if (StatusEffects_active(BUFF_MEDIC, player))
9 {
10 M_ARGV(3, float) = autocvar_g_buffs_medic_rot; // rot_mod
11 M_ARGV(4, float) = M_ARGV(1, float) = autocvar_g_buffs_medic_max; // limit_mod = max_mod
12 M_ARGV(2, float) = autocvar_g_buffs_medic_regen; // regen_mod
13 }
14}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define M_ARGV(x, type)
Definition events.qh:17
float autocvar_g_buffs_medic_rot
Definition medic.qh:8
float autocvar_g_buffs_medic_regen
Definition medic.qh:10
float autocvar_g_buffs_medic_max
Definition medic.qh:9
bool StatusEffects_active(StatusEffect this, entity actor)

References autocvar_g_buffs_medic_max, autocvar_g_buffs_medic_regen, autocvar_g_buffs_medic_rot, entity(), M_ARGV, and StatusEffects_active().