diff --git a/src/engine/shared/config_variables.h b/src/engine/shared/config_variables.h index 9e5fc5de0..7bcef6d80 100644 --- a/src/engine/shared/config_variables.h +++ b/src/engine/shared/config_variables.h @@ -12,6 +12,7 @@ MACRO_CONFIG_INT(PlayerCountry, player_country, -1, -1, 1000, CFGFLAG_SAVE | CFG MACRO_CONFIG_STR(Password, password, 32, "", CFGFLAG_CLIENT | CFGFLAG_SERVER | CFGFLAG_NONTEEHISTORIC, "Password to the server") MACRO_CONFIG_STR(Logfile, logfile, 128, "", CFGFLAG_SAVE | CFGFLAG_CLIENT | CFGFLAG_SERVER, "Filename to log all output to") MACRO_CONFIG_INT(ConsoleOutputLevel, console_output_level, 0, 0, 2, CFGFLAG_CLIENT | CFGFLAG_SERVER, "Adjusts the amount of information in the console") +MACRO_CONFIG_INT(ConsoleEnableColors, console_enable_colors, 1, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SERVER, "Enable colors in console output") MACRO_CONFIG_INT(Events, events, 1, 0, 1, CFGFLAG_SAVE | CFGFLAG_CLIENT | CFGFLAG_SERVER, "Enable triggering of events, (eye emotes on some holidays in server, christmas skins in client).") MACRO_CONFIG_STR(SteamName, steam_name, 16, "", CFGFLAG_SAVE | CFGFLAG_CLIENT, "Last seen name of the Steam profile") diff --git a/src/engine/shared/console.cpp b/src/engine/shared/console.cpp index b08147001..4ed47a1f9 100644 --- a/src/engine/shared/console.cpp +++ b/src/engine/shared/console.cpp @@ -315,11 +315,14 @@ char *CConsole::Format(char *pBuf, int Size, const char *pFrom, const char *pStr void CConsole::Print(int Level, const char *pFrom, const char *pStr, ColorRGBA PrintColor) { - // if the color is pure white, use default terminal color - if(mem_comp(&PrintColor, &gs_ConsoleDefaultColor, sizeof(ColorRGBA)) == 0) - set_console_msg_color(NULL); - else - set_console_msg_color(&PrintColor); + if(g_Config.m_ConsoleEnableColors) + { + // if the color is pure white, use default terminal color + if(mem_comp(&PrintColor, &gs_ConsoleDefaultColor, sizeof(ColorRGBA)) == 0) + set_console_msg_color(NULL); + else + set_console_msg_color(&PrintColor); + } dbg_msg(pFrom, "%s", pStr); set_console_msg_color(NULL); char aBuf[1024];