Skip to content

Commit e7f9a20

Browse files
committed
fix console prefixes
1 parent 01105cc commit e7f9a20

3 files changed

Lines changed: 24 additions & 25 deletions

File tree

source/engine/console.cpp

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,18 @@ const char *getprefix(int type)
2323
const char *prefix = "";
2424
switch(type)
2525
{
26-
case CON_INFO: prefix = "\f0INFO"; break;
27-
case CON_WARN: prefix = "\f5WARNING"; break;
28-
case CON_ERROR: prefix = "\f3ERROR"; break;
29-
case CON_DEBUG: prefix = "\f6DEBUG"; break;
30-
case CON_INIT: prefix = "\f8INIT"; break;
31-
case CON_ECHO: prefix = "\f1ECHO"; break;
32-
case CON_NOTICE: prefix = "\f2NOTICE"; break;
33-
default: prefix = "\f4UNKNOWN"; break;
26+
case CON_CHAT:
27+
case CON_TEAMCHAT:
28+
case CON_GAMEINFO:
29+
case CON_FRAGINFO: break;
30+
case CON_INFO: prefix = "\f0INFO"; break;
31+
case CON_WARN: prefix = "\f5WARNING"; break;
32+
case CON_ERROR: prefix = "\f3ERROR"; break;
33+
case CON_DEBUG: prefix = "\f6DEBUG"; break;
34+
case CON_INIT: prefix = "\f8INIT"; break;
35+
case CON_ECHO: prefix = "\f1ECHO"; break;
36+
case CON_NOTICE: prefix = "\f2NOTICE"; break;
37+
default: prefix = "\f4UNKNOWN"; break;
3438
}
3539
if(prefix[0] != '\0') return tempformatstring("[\fs%s\fr] ", prefix);
3640
return "";

source/game/game.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,6 @@ static const char * const animnames[] =
3939
"vwep idle", "vwep shoot", "vwep melee",
4040
};
4141

42-
// console message types
43-
44-
enum
45-
{
46-
CON_CHAT = 1<<8,
47-
CON_TEAMCHAT = 1<<9,
48-
CON_GAMEINFO = 1<<10,
49-
CON_FRAGINFO = 1<<11
50-
};
51-
5242
// network quantization scale
5343
const float DMF = 16.0f; // for world locations
5444
const float DNF = 100.0f; // for normalized vectors

source/shared/iengine.h

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,18 @@ static inline void loopiter(ident *id, identstack &stack, const char *s) { tagva
184184

185185
enum
186186
{
187-
CON_INFO = 1<<0,
188-
CON_WARN = 1<<1,
189-
CON_ERROR = 1<<2,
190-
CON_DEBUG = 1<<3,
191-
CON_INIT = 1<<4,
192-
CON_ECHO = 1<<5,
193-
CON_NOTICE = 1<<6,
187+
CON_INFO = 1<<0,
188+
CON_WARN = 1<<1,
189+
CON_ERROR = 1<<2,
190+
CON_DEBUG = 1<<3,
191+
CON_INIT = 1<<4,
192+
CON_ECHO = 1<<5,
193+
CON_NOTICE = 1<<6,
194+
195+
CON_CHAT = 1<<8,
196+
CON_TEAMCHAT = 1<<9,
197+
CON_GAMEINFO = 1<<10,
198+
CON_FRAGINFO = 1<<11,
194199

195200
CON_FLAGS = 0xFFFF,
196201
CON_TAG_SHIFT = 16,

0 commit comments

Comments
 (0)