Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
cl_buffs.qc
Go to the documentation of this file.
1#include "cl_buffs.qh"
2
3REGISTER_MUTATOR(cl_buffs, true);
4MUTATOR_HOOKFUNCTION(cl_buffs, WP_Format)
5{
6 entity this = M_ARGV(0, entity);
7 string s = M_ARGV(1, string);
8 if (s == WP_Buff.netname || s == RADARICON_Buff.netname)
9 {
10 Buff b = REGISTRY_GET(StatusEffects, this.wp_extra);
11 M_ARGV(2, vector) = b.m_color;
12 M_ARGV(3, string) = b.m_name;
13 M_ARGV(4, string) = b.m_icon;
14 return true;
15 }
16}
#define REGISTER_MUTATOR(...)
Definition base.qh:295
#define MUTATOR_HOOKFUNCTION(...)
Definition base.qh:335
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
Definition buffs.qh:17
string m_name
Definition buffs.qh:23
vector m_color
Definition buffs.qh:22
#define M_ARGV(x, type)
Definition events.qh:17
#define REGISTRY_GET(id, i)
Definition registry.qh:43
vector
Definition self.qh:92
int wp_extra
Additional networked waypoint state, used for items, weapons, buffs.