From 7dc6017c40c125ebc77818440ae3485de25a1e67 Mon Sep 17 00:00:00 2001 From: Bucky Date: Fri, 15 May 2020 23:27:47 -0600 Subject: [PATCH] Fix buildbot since merging chatbox emoji feature --- codemp/cgame/cg_draw.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/codemp/cgame/cg_draw.c b/codemp/cgame/cg_draw.c index 2031c41cd2..f90486b1b3 100644 --- a/codemp/cgame/cg_draw.c +++ b/codemp/cgame/cg_draw.c @@ -9521,9 +9521,10 @@ void CG_ChatBox_AddString(char *chatStr) int i = 0; while (*str) { + int k; qboolean draw = qfalse; - const char* checkColor = (const char*)(str); + if (Q_IsColorString(checkColor)) { emojiStr[i++] = *str++; emojiStr[i++] = *str++; @@ -9531,7 +9532,7 @@ void CG_ChatBox_AddString(char *chatStr) continue; // duo: fix for messages with lots of colors being broken up too early } - for (int k = 0; k < MAX_LOADABLE_EMOJIS; k++) { + for (k = 0; k < MAX_LOADABLE_EMOJIS; k++) { if (strlen(emojis[k].name) == 0) continue; //or break, since it is mosty likely to be the last available item. @@ -9688,7 +9689,8 @@ static QINLINE void CG_ChatBox_DrawStrings(void) { //draw available emoji's if (cg_chatBoxEmojis.integer) { - for (int k = 0; k < MAX_CHATBOX_ITEM_EMOJIS; k++) { + int k; + for (k = 0; k < MAX_CHATBOX_ITEM_EMOJIS; k++) { if (!drawThese[i]->emoji[k].emoji) continue;