InfoMessage(s);
}
- if(teamplay && !spectatee_status && gametype != MAPINFO_TYPE_CA && teamnagger)
+ if(teamplay && !spectatee_status && teamnagger)
{
float ts_min = 0, ts_max = 0;
entity tm = teams.sort_next;
stuffcmd(this, strcat("\nfog ", world.fog, "\nr_fog_exp2 0\nr_drawfog 1\n"));
if (autocvar_sv_teamnagger && !(autocvar_bot_vs_human && AvailableTeams() == 2))
- if (!g_ca && !g_cts && !g_race) // teamnagger is currently bad for ca, race & cts
+ if(!MUTATOR_CALLHOOK(HideTeamNagger, this))
send_CSQC_teamnagger();
CSQCMODEL_AUTOINIT(this);
MUT_FUSREAC_TARG_VALID, // return this flag to make the function return true (valid target)
MUT_FUSREAC_TARG_INVALID // return this flag to make the function return false (invalid target)
};
+
+/** return true to hide the 'teamnumbers are imbalanced' message */
+#define EV_HideTeamNagger(i, o) \
+ /** player */ i(entity, MUTATOR_ARGV_0_entity) \
+ /**/
+MUTATOR_HOOKABLE(HideTeamNagger, EV_HideTeamNagger);
M_ARGV(2, bool) = true; // all weapons
}
+MUTATOR_HOOKFUNCTION(ca, HideTeamNagger)
+{
+ return true; // doesn't work well with the whole spectator as player thing
+}
+
MUTATOR_HOOKFUNCTION(ca, GetPlayerStatus)
{
entity player = M_ARGV(0, entity);
CTS_ClientKill(player);
}
+MUTATOR_HOOKFUNCTION(cts, HideTeamNagger)
+{
+ return true; // doesn't work so well (but isn't cts a teamless mode?)
+}
+
MUTATOR_HOOKFUNCTION(cts, FixClientCvars)
{
entity player = M_ARGV(0, entity);
M_ARGV(1, string) = ret_string;
}
+MUTATOR_HOOKFUNCTION(rc, HideTeamNagger)
+{
+ return true; // doesn't work so well
+}
+
MUTATOR_HOOKFUNCTION(rc, FixClientCvars)
{
entity player = M_ARGV(0, entity);