aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCerapter <cerap@protonmail.com>2018-09-15 01:16:28 +0200
committerCerapter <cerap@protonmail.com>2018-09-15 01:16:28 +0200
commit8006d40d1495a848b07a59bf514100648c82459c (patch)
tree30a997380472cc82155ee342de68a85768c23d20
parentb33d0b0a3c9311fc43d5d00d56d7b6c8d706adcd (diff)
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.
-rw-r--r--courtroom.cpp16
-rw-r--r--server/aoprotocol.py6
2 files changed, 14 insertions, 8 deletions
diff --git a/courtroom.cpp b/courtroom.cpp
index 7c6b7fb1..5eb2c56e 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 44b46122..47126562 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