8 string BUFF_NAME(int i)
10 Buff b = Buffs_from(i);
11 return sprintf("%s%s", rgb_to_hexcolor(b.m_color), b.m_prettyName);
15 REGISTER_MUTATOR(buffs_flight, true);
16 MUTATOR_HOOKFUNCTION(buffs_flight, IsFlying)
18 noref entity e = MUTATOR_ARGV(0, entity);
19 return BUFFS_STAT(e) & BUFF_FLIGHT.m_itemid;
24 REGISTER_MUTATOR(cl_buffs, true);
25 MUTATOR_HOOKFUNCTION(cl_buffs, HUD_Powerups_add)
27 int allBuffs = STAT(BUFFS);
28 FOREACH(Buffs, it.m_itemid & allBuffs, LAMBDA(
29 addPowerupItem(it.m_prettyName, strcat("buff_", it.m_name), it.m_color, bound(0, STAT(BUFF_TIME) - time, 99), 60);
32 MUTATOR_HOOKFUNCTION(cl_buffs, WP_Format)
34 entity this = MUTATOR_ARGV(0, entity);
35 string s = MUTATOR_ARGV(0, string);
36 if (s == WP_Buff.netname || s == RADARICON_Buff.netname)
38 Buff b = Buffs_from(this.wp_extra);
39 MUTATOR_ARGV(0, vector) = b.m_color;
40 MUTATOR_ARGV(0, string) = b.m_prettyName;