From 570bad6d4775df19229fb7beae7c6a011220bc1c Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Mon, 28 Dec 2020 10:19:15 +0300 Subject: [PATCH] Fix blankposting not respecting character ID's in the equation (#282) Fixes an issue where if you blankpost on top of another character's blankpost, your message won't show up on the ic log clientside. --- src/courtroom.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 9b3b206..e39c3d9 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -1810,6 +1810,7 @@ void Courtroom::handle_chatmessage(QStringList *p_contents) if (p_contents->size() < MS_MINIMUM) return; + int prev_char_id = m_chatmessage[CHAR_ID].toInt(); for (int n_string = 0; n_string < MS_MAXIMUM; ++n_string) { // Note that we have added stuff that vanilla clients and servers simply // won't send. So now, we have to check if the thing we want even exists @@ -1878,8 +1879,8 @@ void Courtroom::handle_chatmessage(QStringList *p_contents) m_chatmessage[MESSAGE] = ""; // Turn it into true blankpost } - if (!m_chatmessage[MESSAGE].isEmpty() || ic_chatlog_history.isEmpty() || - ic_chatlog_history.last().get_message() != "") { + if (prev_char_id != f_char_id || !m_chatmessage[MESSAGE].isEmpty() || + ic_chatlog_history.isEmpty() || ic_chatlog_history.last().get_message() != "") { log_ic_text(f_charname, f_displayname, m_chatmessage[MESSAGE], "", m_chatmessage[TEXT_COLOR].toInt()); append_ic_text(m_chatmessage[MESSAGE], f_displayname, "",