From ce350da4737b6867c60d3e3c23a69b316581eaec Mon Sep 17 00:00:00 2001 From: Cerapter Date: Tue, 18 Dec 2018 11:25:20 +0100 Subject: [PATCH] Moved realisation to `start_chat_ticking()`. Since the realisation could have been called from two paths that were previously one and the same (previously, the pre ending was the same as the text starting -- with the inclusion of non-interrupting preanims, these became different), in some select cases, the realisation could have played twice. As a solution to this, handling realisation is now done when the text starts ticking, as that guarantees that the realisation happens only once. --- courtroom.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/courtroom.cpp b/courtroom.cpp index 9f2f7f7..3ed1e74 100644 --- a/courtroom.cpp +++ b/courtroom.cpp @@ -1582,13 +1582,6 @@ void Courtroom::handle_chatmessage_3() { start_chat_ticking(); - if (m_chatmessage[REALIZATION] == "1") - { - realization_timer->start(60); - ui_vp_realization->show(); - sfx_player->play(ao_app->get_custom_realization(m_chatmessage[CHAR_NAME])); - } - int f_evi_id = m_chatmessage[EVIDENCE_ID].toInt(); QString f_side = m_chatmessage[SIDE]; @@ -1979,6 +1972,13 @@ void Courtroom::start_chat_ticking() if (text_state != 0) return; + if (m_chatmessage[REALIZATION] == "1") + { + realization_timer->start(60); + ui_vp_realization->show(); + sfx_player->play(ao_app->get_custom_realization(m_chatmessage[CHAR_NAME])); + } + ui_vp_message->clear(); set_text_color(); rainbow_counter = 0;