]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/mutators/mutator/buffs/cl_buffs.qc
Experimental status effects system: general backend for buffs and debuffs networked...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / buffs / cl_buffs.qc
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 }