diff --git a/src/console.c b/src/console.c index 0adde1d1..505ab831 100644 --- a/src/console.c +++ b/src/console.c @@ -1443,7 +1443,7 @@ static void CON_DrawHudlines(void) if (con_hudlines <= 0) return; - if (chat_on && (cv_consolechat.value || vid.width < 640)) + if (chat_on && OLDCHAT) y = charheight; // leave place for chat input in the first row of text (only do it if consolechat is on.) else y = 0; diff --git a/src/hu_stuff.c b/src/hu_stuff.c index e8940a19..4142e8d8 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -778,7 +778,7 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum) } - if (cv_consolechat.value) + if OLDCHAT { CONS_Printf(fmt, prefix, cstart, dispname, cend, msg); HU_AddChatText(va(fmt2, prefix, cstart, dispname, cend, msg)); // add it reguardless, in case we decide to change our mind about our chat type. @@ -1875,14 +1875,14 @@ void HU_Drawer(void) // count down the scroll timer. if (chat_scrolltime > 0) chat_scrolltime--; - if (!cv_consolechat.value && vid.width > 320) // don't even bother with 200p + if (!OLDCHAT) HU_DrawChat(); else HU_DrawChat_Old(); // why the fuck......................... } else { - if (!cv_consolechat.value) + if (!OLDCHAT) { HU_drawMiniChat(); // draw messages in a cool fashion. chat_scrolltime = 0; // do scroll anyway. @@ -2005,7 +2005,7 @@ void HU_Erase(void) // clear the message lines that go away, so use _oldclearlines_ bottomline = oldclearlines; oldclearlines = con_clearlines; - if (chat_on && cv_consolechat.value) + if (chat_on && OLDCHAT) if (bottomline < 8) bottomline = 8; // only do it for consolechat. consolechat is gay. diff --git a/src/hu_stuff.h b/src/hu_stuff.h index c288b948..f8fcd375 100644 --- a/src/hu_stuff.h +++ b/src/hu_stuff.h @@ -80,6 +80,7 @@ extern patch_t *tallminus; } chatmsg_t;*/ #define CHAT_BUFSIZE 64 // that's enough messages, right? We'll delete the older ones when that gets out of hand. +#define OLDCHAT (cv_consolechat.value || dedicated || !netgame || vid.width < 640) // some functions void HU_AddChatText(const char *text); diff --git a/src/lua_baselib.c b/src/lua_baselib.c index 575b4452..41bfd008 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -96,7 +96,7 @@ static int lib_chatprint(lua_State *L) if (len > 255) // string is too long!!! return luaL_error(L, "String exceeds the 255 characters limit of the chat buffer."); - if (cv_consolechat.value || !netgame) + if (OLDCHAT) CONS_Printf("%s\n", str); else HU_AddChatText(str); @@ -124,7 +124,7 @@ static int lib_chatprintf(lua_State *L) if (len > 255) // string is too long!!! return luaL_error(L, "String exceeds the 255 characters limit of the chat buffer."); - if (cv_consolechat.value || !netgame) + if (OLDCHAT) CONS_Printf("%s\n", str); else HU_AddChatText(str);