From 241173e6172e2b39fbdbaf3f27f02a9230409727 Mon Sep 17 00:00:00 2001 From: divverent Date: Sun, 24 Feb 2013 16:59:37 +0000 Subject: [PATCH] Nevermind, we can't remove that STX char... just add \{3} for our purposes From: Samual Lenks git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11906 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_parse.c | 4 ++-- console.c | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/cl_parse.c b/cl_parse.c index a97ca0f6..53bc140c 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -1744,7 +1744,7 @@ static void CL_ParseServerInfo (void) cl.movevars_airaccel_sideways_friction = 0; // seperate the printfs so the server message can have a color - Con_Printf("\n\n<===================================>\n\n%s\n", str); + Con_Printf("\n\n<===================================>\n\n\2%s\n", str); // check memory integrity Mem_CheckSentinelsGlobal(); @@ -1800,7 +1800,7 @@ static void CL_ParseServerInfo (void) // seperate the printfs so the server message can have a color if (cls.protocol != PROTOCOL_NEHAHRAMOVIE) // no messages when playing the Nehahra movie - Con_Printf("\n<===================================>\n\n%s\n", str); + Con_Printf("\n<===================================>\n\n\2%s\n", str); // check memory integrity Mem_CheckSentinelsGlobal(); diff --git a/console.c b/console.c index 5724d75e..a54cd629 100644 --- a/console.c +++ b/console.c @@ -1063,7 +1063,7 @@ void Con_MaskPrint(int additionalmask, const char *msg) line[index++] = STRING_COLOR_DEFAULT + '0'; // special color codes for chat messages must always come first // for Con_PrintToHistory to work properly - if (*msg == 1 || *msg == 2) + if (*msg == 1 || *msg == 2 || *msg == 3) { // play talk wav if (*msg == 1) @@ -1072,7 +1072,7 @@ void Con_MaskPrint(int additionalmask, const char *msg) { if(gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC) { - if(msg[1] == '\r' && cl.foundtalk2wav) // if carriage return is in the string, it is a tell message + if(msg[1] == '\r' && cl.foundtalk2wav) S_LocalSound ("sound/misc/talk2.wav"); else S_LocalSound ("sound/misc/talk.wav"); @@ -1086,7 +1086,12 @@ void Con_MaskPrint(int additionalmask, const char *msg) } } } - mask = CON_MASK_CHAT; + + // Send to chatbox for say/tell (1) and messages (3) + // 3 is just so that a message can be sent to the chatbox without a sound. + if (*msg == 1 || *msg == 3) + mask = CON_MASK_CHAT; + line[index++] = STRING_COLOR_TAG; line[index++] = '3'; msg++; -- 2.39.2