Xonotic
cl_buffs.qc
Go to the documentation of this file.
1 #include "cl_buffs.qh"
2 
3 REGISTER_MUTATOR(cl_buffs, true);
4 MUTATOR_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(StatusEffect, 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 }
entity() spawn
#define REGISTRY_GET(id, i)
Definition: registry.qh:43
REGISTER_MUTATOR(cl_buffs, true)
string m_name
Definition: buffs.qh:27
Definition: buffs.qh:20
int wp_extra
Additional networked waypoint state, used for items, weapons, buffs.
#define M_ARGV(x, type)
Definition: events.qh:17
vector(float skel, float bonenum) _skel_get_boneabs_hidden
MUTATOR_HOOKFUNCTION(cl_buffs, WP_Format)
Definition: cl_buffs.qc:4
string m_icon
Definition: buffs.qh:25
vector m_color
Definition: buffs.qh:26