From 475a572c3bdb0f1d4a7353b9c61bbfac71888ef9 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Tue, 18 Aug 2020 18:02:53 +0300 Subject: Improved blankposting (#256) * Consolidate blankposting into singular log entries of "no message" instead of spamming the logs repeatedly when someone decides to keep switching emotes Return proper blankpost checking to 2.8.5 (chatmessage_is_empty bool makes sure the chatbox doesn't appear - branch broke that behavior by never setting it) More robust blankpost checking, meaning that passing a competely empty "" string will also count as a blankpost Fix screenshake not working with blankposting by moving it before the chatmessage_is_empty check in start_chack_ticking() stage of the message parsing * Allow user to send blankposts without even having to input a single spacebar, but only if last m_chatmessage CID matches ours. * Reviews are cool and good:ok_hand: allow sending no-text chat message to server without weird cid checks (let the server validate if they want to do STR_OR_EMPTY or just STR) - doesn't break existing behavior and lets servers introduce the new one if they want to Treat all blank/whitespace messages as blankposting and not just single-whitespace. Remove chatmessage_is_empty bool because why the fuck would you even need it if you have m_chatmessage[MESSAGE] already Simplify chatlogpiece log entry to not be a *temp pointer by suggestion * another useless bool destroyed Make "additive" have a very awesome emergent behavior with blankposting - keep showing the chatbox+message while only changing the emotes. Works with preanims too! --- include/courtroom.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/courtroom.h b/include/courtroom.h index 898e8bab..df75cce5 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -315,9 +315,6 @@ private: bool rainbow_appended = false; bool blank_blip = false; - // Whether or not is this message additive to the previous one - bool is_additive = false; - // Used for getting the current maximum blocks allowed in the IC chatlog. int log_maximum_blocks = 0; @@ -355,7 +352,6 @@ private: static const int MS_MINIMUM = 15; static const int MS_MAXIMUM = 30; QString m_chatmessage[MS_MAXIMUM]; - bool chatmessage_is_empty = false; QString previous_ic_message = ""; QString additive_previous = ""; -- cgit