return sprintf("%s%s", rgb_to_hexcolor(b.m_color), b.m_prettyName);
}
-#ifndef MENUQC
-REGISTER_MUTATOR(buffs_flight, true);
-MUTATOR_HOOKFUNCTION(buffs_flight, IsFlying)
+entity buff_FirstFromFlags(int _buffs)
{
- noref entity e = MUTATOR_ARGV(0, entity);
- return BUFFS_STAT(e) & BUFF_FLIGHT.m_itemid;
+ if (flags)
+ {
+ FOREACH(Buffs, it.m_itemid & _buffs, LAMBDA(return it));
+ }
+ return BUFF_Null;
}
-#endif
#ifdef CSQC
REGISTER_MUTATOR(cl_buffs, true);
}
MUTATOR_HOOKFUNCTION(cl_buffs, WP_Format)
{
- entity this = MUTATOR_ARGV(0, entity);
- string s = MUTATOR_ARGV(0, string);
+ entity this = M_ARGV(0, entity);
+ string s = M_ARGV(1, string);
if (s == WP_Buff.netname || s == RADARICON_Buff.netname)
{
Buff b = Buffs_from(this.wp_extra);
- MUTATOR_ARGV(0, vector) = b.m_color;
- MUTATOR_ARGV(0, string) = b.m_prettyName;
+ M_ARGV(2, vector) = b.m_color;
+ M_ARGV(3, string) = b.m_prettyName;
return true;
}
}