aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscatterflower <2956568+scatterflower@users.noreply.github.com>2020-08-16 21:50:10 -0500
committerGitHub <noreply@github.com>2020-08-16 21:50:10 -0500
commit1bbfd71eebdc6a93a86e0f234417f173131b33aa (patch)
tree3378f228049c3f3fd08bd4e1af9d4e9b47d822a3
parent89aa821d36a65ae604f4ec425c483890fd957db2 (diff)
parentc5f8fc8f96a58d6059781136c6ea37f332ea2ead (diff)
Merge pull request #253 from scatterflower/2.8
Don't hang IC due to invalid emote mod
-rw-r--r--src/courtroom.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index fa55ba8e..a31bd0a7 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -2058,6 +2058,14 @@ void Courtroom::handle_chatmessage_2()
set_scene(m_chatmessage[DESK_MOD], m_chatmessage[SIDE]);
int emote_mod = m_chatmessage[EMOTE_MOD].toInt();
+ // Deal with invalid emote modifiers
+ if (emote_mod != 0 && emote_mod != 1 && emote_mod != 2 \
+ && emote_mod != 5 && emote_mod != 6) {
+ if (emote_mod == 4)
+ emote_mod = 6; // Addresses issue with an old bug that sent the wrong emote modifier for zoompre
+ else
+ emote_mod = 0;
+ }
if (ao_app->flipping_enabled && m_chatmessage[FLIP].toInt() == 1)
ui_vp_player_char->set_flipped(true);