aboutsummaryrefslogtreecommitdiff
path: root/src/courtroom.cpp
diff options
context:
space:
mode:
authorCrystalwarrior <varsash@gmail.com>2019-09-15 17:44:47 +0300
committerCrystalwarrior <varsash@gmail.com>2019-09-15 17:44:47 +0300
commite94640b3493700a266619388d75dac5e56b3189a (patch)
treeb24b8f976d40b64a8e0da04ebd5c3bc78017bdc4 /src/courtroom.cpp
parenta2f9df4042585ab0849b54e2bb0b9699f9064aed (diff)
Looping SFX system - Defined this way:
[SoundL] sfx-roar = 1
Diffstat (limited to 'src/courtroom.cpp')
-rw-r--r--src/courtroom.cpp5
1 files changed, 4 insertions, 1 deletions
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()