diff --git a/include/aocharmovie.h b/include/aocharmovie.h index 8aed1eb..15fa7cf 100644 --- a/include/aocharmovie.h +++ b/include/aocharmovie.h @@ -67,7 +67,7 @@ private: QElapsedTimer actual_time; - //it will forever be a mystery who thought this time_mod system would ever be a good idea with precision-based emotes + //Usually used to turn seconds into milliseconds such as for [Time] tag in char.ini const int time_mod = 60; // These are the X and Y values before they are fixed based on the sprite's width. diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 7cb5cf3..fec354a 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -1391,7 +1391,7 @@ void Courtroom::on_chat_return_pressed() { if (ui_pre->isChecked()) { - if (f_emote_mod == 5) + if (f_emote_mod == 4 || f_emote_mod == 5) f_emote_mod = 6; else f_emote_mod = 2; @@ -1957,7 +1957,7 @@ void Courtroom::play_char_sfx(QString sfx_name) { sfx_player->play(ao_app->get_sfx_suffix(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, QString::number(current_emote))!="0"); } void Courtroom::handle_chatmessage_3() @@ -2396,7 +2396,7 @@ void Courtroom::play_preanim(bool noninterrupting) //all time values in char.inis are multiplied by a constant(time_mod) to get the actual time int ao2_duration = ao_app->get_ao2_preanim_duration(f_char, f_preanim); int text_delay = ao_app->get_text_delay(f_char, f_preanim) * time_mod; - int sfx_delay = m_chatmessage[SFX_DELAY].toInt() * 60; + int sfx_delay = m_chatmessage[SFX_DELAY].toInt() * time_mod; int preanim_duration; @@ -2493,7 +2493,7 @@ void Courtroom::start_chat_ticking() QString f_gender = ao_app->get_gender(m_chatmessage[CHAR_NAME]); - blip_player->set_blips(ao_app->get_sfx_suffix("sfx-blip" + f_gender)); + blip_player->set_blips(ao_app->get_sfx_suffix(f_gender)); //means text is currently ticking text_state = 1; diff --git a/src/emotes.cpp b/src/emotes.cpp index 58e8594..de53169 100644 --- a/src/emotes.cpp +++ b/src/emotes.cpp @@ -159,7 +159,7 @@ void Courtroom::select_emote(int p_id) { ui_pre->setChecked(!ui_pre->isChecked()); } - else if (emote_mod == 1) + else if (emote_mod == 1 || emote_mod == 4) ui_pre->setChecked(true); else ui_pre->setChecked(false); diff --git a/src/packet_distribution.cpp b/src/packet_distribution.cpp index 20a07a6..8c74b76 100644 --- a/src/packet_distribution.cpp +++ b/src/packet_distribution.cpp @@ -192,6 +192,8 @@ void AOApplication::server_packet_received(AOPacket *p_packet) { if (f_packet.contains("yellowtext",Qt::CaseInsensitive)) yellow_text_enabled = true; + if (f_packet.contains("prezoom",Qt::CaseInsensitive)) + prezoom_enabled = true; if (f_packet.contains("flipping",Qt::CaseInsensitive)) flipping_enabled = true; if (f_packet.contains("customobjections",Qt::CaseInsensitive)) diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp index 204de69..f38bbb5 100644 --- a/src/text_file_functions.cpp +++ b/src/text_file_functions.cpp @@ -628,8 +628,10 @@ QString AOApplication::get_gender(QString p_char) QString f_result = read_char_ini(p_char, "gender", "Options"); if (f_result == "") - return "male"; - else return f_result; + return "sfx-blipmale"; + if (!file_exists(get_sfx(f_result))) + f_result = "sfx-blip" + f_result; + return f_result; } QString AOApplication::get_chat(QString p_char)