Fix old chat detection.

This commit is contained in:
Latapostrophe 2018-08-19 11:12:21 +02:00
parent 8747a8529d
commit b09019dc4a
4 changed files with 8 additions and 7 deletions

View File

@ -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;

View File

@ -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.

View File

@ -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);

View File

@ -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);