From: z411 Date: Sun, 27 Mar 2022 05:16:43 +0000 (-0300) Subject: Add chat prefixes X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=698d4ecd91815e6e84c06a59d84f2f2fe9d36649;p=xonotic%2Fxonotic-data.pk3dir.git Add chat prefixes --- diff --git a/qcsrc/server/chat.qc b/qcsrc/server/chat.qc index a73de2a1f..1cbc8ec80 100644 --- a/qcsrc/server/chat.qc +++ b/qcsrc/server/chat.qc @@ -62,8 +62,15 @@ int Say(entity source, int teamsay, entity privatesay, string msgin, bool floodc string namestr = ""; if (source) + { namestr = playername(source.netname, source.team, (autocvar_g_chat_teamcolors && IS_PLAYER(source))); + if (IS_DEAD(source) || source.frags == FRAGS_PLAYER_OUT_OF_GAME) + namestr = strcat(_("(DEAD)"), " ", namestr); + else if (IS_OBSERVER(source) || IS_SPEC(source)) + namestr = strcat(_("(s)"), " ", namestr); + } + string colorprefix = (strdecolorize(namestr) == namestr) ? "^3" : "^7"; string msgstr = "", cmsgstr = "";