aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCerapter <cerap@protonmail.com>2018-12-18 11:25:20 +0100
committerCerapter <cerap@protonmail.com>2018-12-18 11:29:06 +0100
commitce350da4737b6867c60d3e3c23a69b316581eaec (patch)
treec8e5e33d52fc82a4528f85c454c909390a07deba
parent2e9404153b7fa86eb8b740f1f16d5c85b83ae213 (diff)
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.
-rw-r--r--courtroom.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/courtroom.cpp b/courtroom.cpp
index 9f2f7f7d..3ed1e745 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;