1 #include "sv_pinata.qh"
3 REGISTER_MUTATOR(pinata, cvar("g_pinata") && !cvar("g_instagib") && !cvar("g_overkill"));
5 MUTATOR_HOOKFUNCTION(pinata, PlayerDies)
7 entity frag_target = M_ARGV(2, entity);
9 .entity weaponentity = weaponentities[0]; // TODO: unhardcode
11 FOREACH(Weapons, it != WEP_Null, LAMBDA(
12 if(frag_target.weapons & WepSet_FromWeapon(it))
13 if(frag_target.(weaponentity).m_switchweapon != it)
14 if(W_IsWeaponThrowable(frag_target, it.m_id))
15 W_ThrowNewWeapon(frag_target, it.m_id, false, CENTER_OR_VIEWOFS(frag_target), randomvec() * 175 + '0 0 325', weaponentity);
21 MUTATOR_HOOKFUNCTION(pinata, BuildMutatorsString)
23 M_ARGV(0, string) = strcat(M_ARGV(0, string), ":Pinata");
26 MUTATOR_HOOKFUNCTION(pinata, BuildMutatorsPrettyString)
28 M_ARGV(0, string) = strcat(M_ARGV(0, string), ", PiƱata");