Chat: Scroll the text up before clearing entries.
This commit is contained in:
parent
ddbec9d0db
commit
41a3032507
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue