From e94640b3493700a266619388d75dac5e56b3189a Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Sun, 15 Sep 2019 17:44:47 +0300 Subject: Looping SFX system - Defined this way: [SoundL] sfx-roar = 1 --- src/courtroom.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/courtroom.cpp') diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 30921d84..2aa82b52 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -1425,7 +1425,7 @@ void Courtroom::handle_chatmessage(QStringList *p_contents) default: qDebug() << "W: Logic error in objection switch statement!"; } - + sfx_player->clear(); //Objection played! Cut all sfx. int emote_mod = m_chatmessage[EMOTE_MOD].toInt(); if (emote_mod == 0) @@ -1444,6 +1444,8 @@ void Courtroom::handle_chatmessage_2() { ui_vp_speedlines->stop(); ui_vp_player_char->stop(); + //Clear all looping sfx to prevent obnoxiousness + sfx_player->loop_clear(); if (m_chatmessage[SHOWNAME].isEmpty() || !ui_showname_enable->isChecked()) { @@ -2470,6 +2472,7 @@ void Courtroom::play_sfx() return; sfx_player->play(ao_app->get_sfx_suffix(sfx_name)); + sfx_player->set_looping(ao_app->get_sfx_looping(current_char, sfx_name)!="0"); } void Courtroom::set_scene() -- cgit