Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
resistance.qc
Go to the documentation of this file.
1#include "resistance.qh"
2
3#ifdef SVQC
8
9METHOD(ResistanceBuff, m_tick, void(StatusEffect this, entity actor))
10{
11 SUPER(ResistanceBuff).m_tick(this, actor);
12 if(!this.m_active(this, actor))
13 return;
14 buff_Effect(actor, EFFECT_ARMOR_REPAIR, CENTER_OF_ENT(actor), vec2(actor.velocity), 1, true);
15}
16#endif // SVQC
17#ifdef MENUQC
18METHOD(ResistanceBuff, describe, string(ResistanceBuff this))
19{
20 TC(ResistanceBuff, this);
22 PAR(_("The %s buff greatly reduces your damage taken while the buff is active."), COLORED_NAME(this));
23 PAR(_("This also impacts the damage you deal to yourself."));
24 return PAGE_TEXT;
25}
26#endif // MENUQC
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define COLORED_NAME(this)
Definition color.qh:189
#define CENTER_OF_ENT(ent)
Definition util.qh:10
#define TC(T, sym)
Definition _all.inc:82
float bound(float min, float value, float max)
#define SUPER(cname)
Definition oo.qh:236
#define METHOD(cname, name, prototype)
Definition oo.qh:274
float buff_Resistance_CalculateDamage(float frag_damage)
Definition resistance.qc:4
float autocvar_g_buffs_resistance_blockpercent
Definition resistance.qh:6
#define PAGE_TEXT
Definition string.qh:651
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
Definition string.qh:657
#define PAGE_TEXT_INIT()
Definition string.qh:650
void buff_Effect(entity player, entity eff, vector eff_loc, vector eff_vel, int eff_cnt, bool hide)
Spawn effects on a player with a buff.
Definition sv_buffs.qc:103
float frag_damage
Definition sv_ctf.qc:2316
#define vec2(...)
Definition vector.qh:95