diff --git a/engine/client/console.c b/engine/client/console.c index 370864a0c..62da47d71 100644 --- a/engine/client/console.c +++ b/engine/client/console.c @@ -694,6 +694,18 @@ void Con_PrintCon (console_t *con, char *txt) continue; } } + if (c == '&' && txt[1] == 'c') + { + // ezQuake color codes + + if (ishexcode(txt[2]) && ishexcode(txt[3]) && ishexcode(txt[4])) + { + // Just strip it for now + // TODO: Colorize the console properly + txt += 5; + continue; + } + } if (c=='\t') c = ' '; diff --git a/engine/common/console.h b/engine/common/console.h index cc1037a93..088baf457 100644 --- a/engine/common/console.h +++ b/engine/common/console.h @@ -86,6 +86,7 @@ extern conchar_t q3codemasks[MAXQ3COLOURS]; #define CON_TEXTSIZE 16384 #define isextendedcode(x) ((x >= '0' && x <= '9') || (x >= 'A' && x <= 'F') || x == '-') +#define ishexcode(x) ((x >= '0' && x <= '9') || (x >= 'A' && x <= 'F') || (x >= 'a' && x <= 'f')) typedef struct console_s {