LogTeamchange(client.playerid, client.team, type);
}
+/** print(), but only print if the server is not local */
+void dedicated_print(string input)
+{
+ if (server_is_dedicated) print(input);
+}
+
/**
* message "": do not say, just test flood control
* return value:
sourcecmsgstr = cmsgstr;
}
- if(!privatesay)
- if (!IS_PLAYER(source))
+ if (!privatesay && source && !IS_PLAYER(source))
{
if (!intermission_running)
if(teamsay || (autocvar_g_chat_nospectators == 1) || (autocvar_g_chat_nospectators == 2 && !(warmup_stage || gameover)))
dedicated_print(msgstr); // send to server console too
FOREACH_CLIENT(!IS_PLAYER(it) && IS_REAL_CLIENT(it) && it != source, sprint(it, msgstr));
}
- else {
- if (sourcemsgstr != msgstr) { // trimmed/server fixed message, sent to all players
+ else
+ {
+ if (source) {
sprint(source, sourcemsgstr);
dedicated_print(msgstr); // send to server console too
- FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != source, sprint(it, msgstr));
- } else { // entirely normal message, sent to all players -- bprint sends to server console too.
- bprint(msgstr);
+ MX_Say(strcat(playername(source), "^7: ", msgin));
}
- if (source) MX_Say(strcat(playername(source), "^7: ", msgin));
+ FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != source, sprint(it, msgstr));
}
}