From: TimePath Date: Thu, 5 Apr 2018 11:16:23 +0000 (+1000) Subject: Chat: default to NOTICE_SILENT, fixes a svc_print from the engine making sound when... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2da4d6b7cb23ea345e8602b32649c0671c783615;p=xonotic%2Fxonotic-data.pk3dir.git Chat: default to NOTICE_SILENT, fixes a svc_print from the engine making sound when it shouldn't --- diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 4fa24bd3d..20c50f577 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -916,16 +916,17 @@ void CSQC_Parse_Print(string strMessage) { if (autocvar_developer_csqcentities) LOG_INFOF("CSQC_Parse_Print(\"%s\")", strMessage); if (autocvar__cl_hook_print != "") { - int flags = 0; + int flags = NOTICE_SILENT; string s = substring(strMessage, 0, -2); // remove trailing \n int c = str2chr(s, 0); if (c == 1 || c == 2 || c == 3) { s = substring(s, 1, -1); - if (c != 1) { - flags |= NOTICE_SILENT; - } else if (str2chr(s, 0) == '\r') { - s = substring(s, 1, -1); - flags |= NOTICE_PRIVATE; + if (c == 1) { + flags &= ~NOTICE_SILENT; + if (str2chr(s, 0) == '\r') { + s = substring(s, 1, -1); + flags |= NOTICE_PRIVATE; + } } if (c != 2) { flags |= NOTICE_CHAT;