Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
jump.qc
Go to the documentation of this file.
1#include "jump.qh"
2
3#ifdef SVQC
4float buff_Jump_ChangeDamage(float frag_damage, float frag_deathtype)
5{
6 if (frag_deathtype == DEATH_FALL.m_id)
7 frag_damage = 0;
8 return frag_damage;
9}
10
11MUTATOR_HOOKFUNCTION(buffs, PlayerPhysics)
12{
13 entity player = M_ARGV(0, entity);
14
15 // these automatically reset, no need to worry
16 if (StatusEffects_active(BUFF_JUMP, player))
17 STAT(MOVEVARS_JUMPVELOCITY, player) = autocvar_g_buffs_jump_velocity;
18}
19#endif // SVQC
20#ifdef MENUQC
21METHOD(JumpBuff, describe, string(JumpBuff this))
22{
23 TC(JumpBuff, this);
25 PAR(_("The %s buff greatly increases your jump height, while the buff is active."), COLORED_NAME(this));
26 PAR(_("It also makes you immune to fall damage."));
27 return PAGE_TEXT;
28}
29#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
float buff_Jump_ChangeDamage(float frag_damage, float frag_deathtype)
Definition jump.qc:4
float autocvar_g_buffs_jump_velocity
Definition jump.qh:6
#define TC(T, sym)
Definition _all.inc:82
#define STAT(...)
Definition stats.qh:82
#define METHOD(cname, name, prototype)
Definition oo.qh:269
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