int tested = 0;
FOREACH_CLIENT_RANDOM(IS_PLAYER(it), LAMBDA(
if (autocvar_g_spawn_near_teammate_ignore_spawnpoint_max && tested >= autocvar_g_spawn_near_teammate_ignore_spawnpoint_max) break;
+
+ if (PHYS_INPUT_BUTTON_CHAT(it)) continue;
if (!SAME_TEAM(player, it)) continue;
if (autocvar_g_spawn_near_teammate_ignore_spawnpoint_check_health && it.health < autocvar_g_balance_health_regenstable) continue;
if (IS_DEAD(it)) continue;
cursor = trace_endpos;
cursor_ent = trace_ent;
+ MUTATOR_CALLHOOK(PreFormatMessage, this, msg);
+ msg = M_ARGV(1, string);
+
while (1) {
if (n < 1)
break; // too many replacements
/**/
MUTATOR_HOOKABLE(FormatMessage, EV_FormatMessage);
+/** called before any formatting is applied, handy for tweaking the message before scripts get ahold of it */
+#define EV_PreFormatMessage(i, o) \
+ /** player */ i(entity, MUTATOR_ARGV_0_entity) \
+ /** message */ i(string, MUTATOR_ARGV_1_string) \
+ /**/ o(string, MUTATOR_ARGV_1_string) \
+ /**/
+MUTATOR_HOOKABLE(PreFormatMessage, EV_PreFormatMessage);
+
/** returns true if throwing the current weapon shall not be allowed */
#define EV_ForbidThrowCurrentWeapon(i, o) \
/** player */ i(entity, MUTATOR_ARGV_0_entity) \