From 8006d40d1495a848b07a59bf514100648c82459c Mon Sep 17 00:00:00 2001 From: Cerapter Date: Sat, 15 Sep 2018 01:16:28 +0200 Subject: [PATCH] Fixed bugs regarding noninterrupting pres. - They are now actually non-interrupting when an interjection is played. - Realisation now happens at the start of the message if the pre is non-interrupting. --- courtroom.cpp | 16 ++++++++-------- server/aoprotocol.py | 6 ++++++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/courtroom.cpp b/courtroom.cpp index 7c6b7fb..5eb2c56 100644 --- a/courtroom.cpp +++ b/courtroom.cpp @@ -1141,7 +1141,7 @@ void Courtroom::on_chat_return_pressed() packet_contents.append(QString::number(offset_with_pair)); } - if (ui_pre_non_interrupt->isChecked() and ui_pre->isChecked()) + if (ui_pre_non_interrupt->isChecked()) { if (ui_ic_chat_name->text().isEmpty()) { @@ -1502,6 +1502,13 @@ 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_sfx("realization")); + } + int f_evi_id = m_chatmessage[EVIDENCE_ID].toInt(); QString f_side = m_chatmessage[SIDE]; @@ -1575,13 +1582,6 @@ void Courtroom::handle_chatmessage_3() anim_state = 3; } - if (m_chatmessage[REALIZATION] == "1") - { - realization_timer->start(60); - ui_vp_realization->show(); - sfx_player->play(ao_app->get_sfx("realization")); - } - QString f_message = m_chatmessage[MESSAGE]; QStringList call_words = ao_app->get_call_words(); diff --git a/server/aoprotocol.py b/server/aoprotocol.py index 44b4612..4712656 100644 --- a/server/aoprotocol.py +++ b/server/aoprotocol.py @@ -418,6 +418,12 @@ class AOProtocol(asyncio.Protocol): if len(showname) > 15: self.client.send_host_message("Your IC showname is way too long!") return + if nonint_pre != '': + if button in (1, 2, 3, 4, 23): + if anim_type == 1 or anim_type == 2: + anim_type = 0 + elif anim_type == 6: + anim_type = 5 if self.client.area.non_int_pres_only: if anim_type == 1 or anim_type == 2: anim_type = 0