diff options
-rw-r--r-- | code/botlib/be_ai_chat.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/code/botlib/be_ai_chat.c b/code/botlib/be_ai_chat.c index d61e11e..7df59e9 100644 --- a/code/botlib/be_ai_chat.c +++ b/code/botlib/be_ai_chat.c @@ -367,13 +367,16 @@ void BotQueueConsoleMessage(int chatstate, int type, char *message) int BotNextConsoleMessage(int chatstate, bot_consolemessage_t *cm) { bot_chatstate_t *cs; + bot_consolemessage_t *firstmsg; cs = BotChatStateFromHandle(chatstate); if (!cs) return 0; - if (cs->firstmessage) + if ((firstmsg = cs->firstmessage)) { - Com_Memcpy(cm, cs->firstmessage, sizeof(bot_consolemessage_t)); - cm->next = cm->prev = NULL; + cm->handle = firstmsg->handle; + cm->time = firstmsg->time; + cm->type = firstmsg->type; + Q_strncpyz(cm->message, firstmsg->message, sizeof(cm->message)); return cm->handle; } //end if return 0; |