Skip to content

Commit

Permalink
Fix buildbot since merging chatbox emoji feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Bucky21659 committed May 16, 2020
1 parent 64349df commit 7dc6017
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions codemp/cgame/cg_draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -9521,17 +9521,18 @@ 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++;

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.

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 7dc6017

Please sign in to comment.