Fix looping frame SFX not working w/ AOV's definitions
This commit is contained in:
parent
88de4cde04
commit
a5868aa380
@ -371,7 +371,7 @@ public:
|
||||
QString get_emote_blip(QString p_char, int p_emote);
|
||||
|
||||
// Returns if the sfx is defined as looping in char.ini
|
||||
QString get_sfx_looping(QString p_char, QString p_sfx);
|
||||
QString get_sfx_looping(QString p_char, int p_emote);
|
||||
|
||||
// Returns if an emote has a frame specific SFX for it
|
||||
QString get_sfx_frame(QString p_char, QString p_emote, int n_frame);
|
||||
|
@ -1637,7 +1637,7 @@ void Courtroom::on_chat_return_pressed()
|
||||
// emote uses it.
|
||||
if (ao_app->looping_sfx_support_enabled) {
|
||||
packet_contents.append(
|
||||
"0"); // ao_app->get_sfx_looping(current_char, current_emote));
|
||||
ao_app->get_sfx_looping(current_char, current_emote));
|
||||
packet_contents.append(QString::number(screenshake_state));
|
||||
|
||||
QString pre_emote = ao_app->get_pre_emote(current_char, current_emote);
|
||||
@ -2124,10 +2124,10 @@ void Courtroom::do_effect(QString fx_name, QString fx_sound, QString p_char,
|
||||
void Courtroom::play_char_sfx(QString sfx_name)
|
||||
{
|
||||
sfx_player->play(sfx_name);
|
||||
if (ao_app->get_looping_sfx())
|
||||
sfx_player->set_looping(
|
||||
ao_app->get_sfx_looping(current_char, QString::number(current_emote)) !=
|
||||
"0");
|
||||
// sfx_player->set_looping(false);
|
||||
// if (ao_app->get_looping_sfx())
|
||||
// sfx_player->set_looping(
|
||||
// ao_app->get_sfx_looping(current_char, current_emote) == "1");
|
||||
}
|
||||
|
||||
void Courtroom::handle_chatmessage_3()
|
||||
@ -2877,8 +2877,8 @@ void Courtroom::play_sfx()
|
||||
|
||||
sfx_player->play(sfx_name);
|
||||
if (ao_app->get_looping_sfx())
|
||||
sfx_player->set_looping(ao_app->get_sfx_looping(current_char, sfx_name) !=
|
||||
"0");
|
||||
sfx_player->set_looping(
|
||||
ao_app->get_sfx_looping(current_char, current_emote) == "1");
|
||||
}
|
||||
|
||||
void Courtroom::set_scene(QString f_desk_mod, QString f_side)
|
||||
|
@ -558,8 +558,8 @@ QString AOApplication::get_static_image_suffix(QString path_to_check)
|
||||
}
|
||||
|
||||
// returns whatever is to the right of "search_line =" within target_tag and
|
||||
// terminator_tag, trimmed returns the empty string if the search line couldnt be
|
||||
// found
|
||||
// terminator_tag, trimmed returns the empty string if the search line couldnt
|
||||
// be found
|
||||
QString AOApplication::read_char_ini(QString p_char, QString p_search_line,
|
||||
QString target_tag)
|
||||
{
|
||||
@ -805,13 +805,16 @@ int AOApplication::get_sfx_delay(QString p_char, int p_emote)
|
||||
return f_result.toInt();
|
||||
}
|
||||
|
||||
QString AOApplication::get_sfx_looping(QString p_char, QString p_sfx)
|
||||
QString AOApplication::get_sfx_looping(QString p_char, int p_emote)
|
||||
{
|
||||
QString f_result = read_char_ini(p_char, p_sfx, "SoundL");
|
||||
QString f_result =
|
||||
read_char_ini(p_char, QString::number(p_emote + 1), "SoundL");
|
||||
|
||||
qDebug() << f_result;
|
||||
if (f_result == "")
|
||||
return "0";
|
||||
return f_result;
|
||||
else
|
||||
return f_result;
|
||||
}
|
||||
|
||||
QString AOApplication::get_sfx_frame(QString p_char, QString p_emote,
|
||||
|
Loading…
Reference in New Issue
Block a user