Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
medic.qc
Go to the documentation of this file.
1#include "medic.qh"
2
3#ifdef SVQC
4MUTATOR_HOOKFUNCTION(buffs, PlayerRegen)
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}
15
22#endif // SVQC
23#ifdef MENUQC
24METHOD(MedicBuff, describe, string(MedicBuff this))
25{
26 TC(MedicBuff, this);
28 PAR(_("The %s buff increases health regeneration speed, increases the maximum health you can have before health starts to rot, and reduces health rot speed until the buff expires."), COLORED_NAME(this));
29 PAR(_("It also gives you a chance to survive a fatal hit, with a small amount of health left over."));
30 return PAGE_TEXT;
31}
32#endif // MENUQC
#define MUTATOR_HOOKFUNCTION(...)
Definition base.qh:335
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define COLORED_NAME(this)
Definition color.qh:195
#define M_ARGV(x, type)
Definition events.qh:17
#define TC(T, sym)
Definition _all.inc:82
float buff_Medic_CalculateSurviveDamage(float frag_damage, float health)
Definition medic.qc:16
float autocvar_g_buffs_medic_survive_health
Definition medic.qh:7
float autocvar_g_buffs_medic_survive_chance
Definition medic.qh:6
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
float random(void)
float max(float f,...)
#define METHOD(cname, name, prototype)
Definition oo.qh:269
float health
Legacy fields for the resources. To be removed.
Definition resources.qh:9
bool StatusEffects_active(StatusEffect this, entity actor)
#define PAGE_TEXT
Definition string.qh:643
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
Definition string.qh:649
#define PAGE_TEXT_INIT()
Definition string.qh:642
float frag_damage
Definition sv_ctf.qc:2322