From: divverent Date: Sat, 25 Dec 2010 17:43:37 +0000 (+0000) Subject: less unix terminal spam if developer <= 0 (should this get an option or not? probably... X-Git-Tag: xonotic-v0.5.0~438^2~159 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=ced116bd186ded94c1487b51dad53dc6c313b2c9;hp=d69b47180eac5d4e158bc9a3c7dbc13547eb8de2;p=xonotic%2Fdarkplaces.git less unix terminal spam if developer <= 0 (should this get an option or not? probably not, anyone who wants to see this can do developer 1); developer stuff still by default ends up in logfile, rcon replies, condump git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10682 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/console.c b/console.c index 8a3fa90f..d443dea4 100644 --- a/console.c +++ b/console.c @@ -1050,8 +1050,6 @@ void Con_MaskPrint(int additionalmask, const char *msg) for (;*msg;msg++) { Con_Rcon_AddChar(*msg); - if (index == 0) - mask |= additionalmask; // if this is the beginning of a new line, print timestamp if (index == 0) { @@ -1096,6 +1094,8 @@ void Con_MaskPrint(int additionalmask, const char *msg) for (;*timestamp;index++, timestamp++) if (index < (int)sizeof(line) - 2) line[index] = *timestamp; + // add the mask + mask |= additionalmask; } // append the character line[index++] = *msg; @@ -1110,10 +1110,10 @@ void Con_MaskPrint(int additionalmask, const char *msg) if (con_initialized && cls.state != ca_dedicated) { Con_PrintToHistory(line, mask); - mask = 0; } // send to terminal or dedicated server window if (!sys_nostdout) + if (developer.integer || !(mask & CON_MASK_DEVELOPER)) { if(sys_specialcharactertranslation.integer) { @@ -1310,6 +1310,7 @@ void Con_MaskPrint(int additionalmask, const char *msg) } // empty the line buffer index = 0; + mask = 0; } } }