From 41a303250704957399b069d20f741149f510099f Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Wed, 6 Mar 2019 23:26:12 +0100 Subject: [PATCH] Chat: Scroll the text up before clearing entries. --- Source/client/chat.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/client/chat.c b/Source/client/chat.c index cc03ad39..16c5ecbe 100644 --- a/Source/client/chat.c +++ b/Source/client/chat.c @@ -30,6 +30,13 @@ void Chat_Draw(void) // Remove messages after a g_chattime has passed if (g_chattime < time) { + for (int i = 0; i < g_chatlines; i++) { + if (g_chatbuffer[i+1] != __NULL__) { + g_chatbuffer[i] = g_chatbuffer[i+1]; + } else { + break; + } + } g_chatbuffer[g_chatlines] = __NULL__; g_chatlines--; g_chattime = time + CHAT_TIME;