diff options
| author | Crystalwarrior <Varsash@Gmail.com> | 2022-07-30 15:38:37 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-30 14:38:37 +0200 |
| commit | d9bdb7e6bca8c5168d1b280fce4ee60c894a9a7e (patch) | |
| tree | f6826b6f6dd3dd00b5c42e227c8b6f407661fe5d /src/courtroom.cpp | |
| parent | d8c89f056bcf7326519784633c374fdda5999736 (diff) | |
Fix get_effect_property ignoring the provided effect folder and using the char.ini instead. Makes it consistent with get_effect behavior (#828)
Diffstat (limited to 'src/courtroom.cpp')
| -rw-r--r-- | src/courtroom.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index ab1ea8a6..614d97a1 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -2079,18 +2079,18 @@ void Courtroom::on_chat_return_pressed() packet_contents.append(ui_additive->isChecked() ? "1" : "0"); } if (ao_app->effects_supported) { - QString fx_sound = - ao_app->get_effect_property(effect, current_char, "sound"); - QString p_effect = + QString p_effect_folder = ao_app->read_char_ini(current_char, "effects", "Options"); + QString fx_sound = + ao_app->get_effect_property(effect, current_char, p_effect_folder, "sound"); // Don't overlap the two sfx if (!ui_pre->isChecked() && (!custom_sfx.isEmpty() || ui_sfx_dropdown->currentIndex() == 1)) { fx_sound = "0"; } - packet_contents.append(effect + "|" + p_effect + "|" + fx_sound); - if (!ao_app->is_stickyeffects_enabled() && !ao_app->get_effect_property(effect, current_char, "sticky").startsWith("true")) { + packet_contents.append(effect + "|" + p_effect_folder + "|" + fx_sound); + if (!ao_app->is_stickyeffects_enabled() && !ao_app->get_effect_property(effect, current_char, p_effect_folder, "sticky").startsWith("true")) { ui_effects_dropdown->blockSignals(true); ui_effects_dropdown->setCurrentIndex(0); ui_effects_dropdown->blockSignals(false); @@ -2704,29 +2704,29 @@ void Courtroom::do_effect(QString fx_path, QString fx_sound, QString p_char, return; } ui_vp_effect->transform_mode = ao_app->get_scaling( - ao_app->get_effect_property(fx_path, p_char, "scaling")); + ao_app->get_effect_property(fx_path, p_char, p_folder, "scaling")); ui_vp_effect->stretch = - ao_app->get_effect_property(fx_path, p_char, "stretch") + ao_app->get_effect_property(fx_path, p_char, p_folder, "stretch") .startsWith("true"); - ui_vp_effect->set_flipped(ao_app->get_effect_property(fx_path, p_char, "respect_flip").startsWith("true") && m_chatmessage[FLIP].toInt() == 1); + ui_vp_effect->set_flipped(ao_app->get_effect_property(fx_path, p_char, p_folder, "respect_flip").startsWith("true") && m_chatmessage[FLIP].toInt() == 1); ui_vp_effect->set_play_once( false); // The effects themselves dictate whether or not they're looping. // Static effects will linger. bool looping = - ao_app->get_effect_property(fx_path, p_char, "loop") + ao_app->get_effect_property(fx_path, p_char, p_folder, "loop") .startsWith("true"); int max_duration = - ao_app->get_effect_property(fx_path, p_char, "max_duration") + ao_app->get_effect_property(fx_path, p_char, p_folder, "max_duration") .toInt(); bool cull = - ao_app->get_effect_property(fx_path, p_char, "cull") + ao_app->get_effect_property(fx_path, p_char, p_folder, "cull") .startsWith("true"); // Possible values: "chat", "character", "behind" - QString layer = ao_app->get_effect_property(fx_path, p_char, "layer").toLower(); + QString layer = ao_app->get_effect_property(fx_path, p_char, p_folder, "layer").toLower(); if (layer == "behind"){ ui_vp_effect->setParent(ui_viewport); ui_vp_effect->stackUnder(ui_vp_player_char); @@ -2753,7 +2753,7 @@ void Courtroom::do_effect(QString fx_path, QString fx_sound, QString p_char, effect_y = ui_viewport->y(); } // This effect respects the character offset settings - if (ao_app->get_effect_property(fx_path, p_char, "respect_offset") == "true") { + if (ao_app->get_effect_property(fx_path, p_char, p_folder, "respect_offset") == "true") { QStringList self_offsets = m_chatmessage[SELF_OFFSET].split("&"); int self_offset = self_offsets[0].toInt(); int self_offset_v; |
