diff options
| author | scatterflower <marisaposs@gameboyprinter.moe> | 2020-08-16 17:47:05 -0500 |
|---|---|---|
| committer | scatterflower <marisaposs@gameboyprinter.moe> | 2020-08-16 17:47:05 -0500 |
| commit | 8712ed3ca14dfe571101dcc35c3b3a7206aaa1fc (patch) | |
| tree | 4d61ef377d33a615ddf7a5683fef8946df104b0b | |
| parent | 4b7efc8536f4ea518eb43483e3805255f36ada75 (diff) | |
Don't hang IC due to invalid emote mod
| -rw-r--r-- | src/courtroom.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index fa55ba8e..164537d1 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -2058,6 +2058,13 @@ 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 > 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); |
