Allow gender (blip sounds) that don't use sfx-blip naming convention
Fix "prezoom" packet being ignored Allow char.ini's to indicate a zoom w/ preanimation by using emote_mod=4 ((ALL OF THESE ARE UNTESTED - TESTING NEEDED!))
This commit is contained in:
parent
3595fd11e6
commit
bef368e986
@ -67,7 +67,7 @@ private:
|
|||||||
|
|
||||||
QElapsedTimer actual_time;
|
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;
|
const int time_mod = 60;
|
||||||
|
|
||||||
// These are the X and Y values before they are fixed based on the sprite's width.
|
// These are the X and Y values before they are fixed based on the sprite's width.
|
||||||
|
@ -1391,7 +1391,7 @@ void Courtroom::on_chat_return_pressed()
|
|||||||
{
|
{
|
||||||
if (ui_pre->isChecked())
|
if (ui_pre->isChecked())
|
||||||
{
|
{
|
||||||
if (f_emote_mod == 5)
|
if (f_emote_mod == 4 || f_emote_mod == 5)
|
||||||
f_emote_mod = 6;
|
f_emote_mod = 6;
|
||||||
else
|
else
|
||||||
f_emote_mod = 2;
|
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));
|
sfx_player->play(ao_app->get_sfx_suffix(sfx_name));
|
||||||
if(ao_app->get_looping_sfx())
|
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()
|
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
|
//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 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 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;
|
int preanim_duration;
|
||||||
|
|
||||||
@ -2493,7 +2493,7 @@ void Courtroom::start_chat_ticking()
|
|||||||
|
|
||||||
QString f_gender = ao_app->get_gender(m_chatmessage[CHAR_NAME]);
|
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
|
//means text is currently ticking
|
||||||
text_state = 1;
|
text_state = 1;
|
||||||
|
@ -159,7 +159,7 @@ void Courtroom::select_emote(int p_id)
|
|||||||
{
|
{
|
||||||
ui_pre->setChecked(!ui_pre->isChecked());
|
ui_pre->setChecked(!ui_pre->isChecked());
|
||||||
}
|
}
|
||||||
else if (emote_mod == 1)
|
else if (emote_mod == 1 || emote_mod == 4)
|
||||||
ui_pre->setChecked(true);
|
ui_pre->setChecked(true);
|
||||||
else
|
else
|
||||||
ui_pre->setChecked(false);
|
ui_pre->setChecked(false);
|
||||||
|
@ -192,6 +192,8 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
|
|||||||
{
|
{
|
||||||
if (f_packet.contains("yellowtext",Qt::CaseInsensitive))
|
if (f_packet.contains("yellowtext",Qt::CaseInsensitive))
|
||||||
yellow_text_enabled = true;
|
yellow_text_enabled = true;
|
||||||
|
if (f_packet.contains("prezoom",Qt::CaseInsensitive))
|
||||||
|
prezoom_enabled = true;
|
||||||
if (f_packet.contains("flipping",Qt::CaseInsensitive))
|
if (f_packet.contains("flipping",Qt::CaseInsensitive))
|
||||||
flipping_enabled = true;
|
flipping_enabled = true;
|
||||||
if (f_packet.contains("customobjections",Qt::CaseInsensitive))
|
if (f_packet.contains("customobjections",Qt::CaseInsensitive))
|
||||||
|
@ -628,8 +628,10 @@ QString AOApplication::get_gender(QString p_char)
|
|||||||
QString f_result = read_char_ini(p_char, "gender", "Options");
|
QString f_result = read_char_ini(p_char, "gender", "Options");
|
||||||
|
|
||||||
if (f_result == "")
|
if (f_result == "")
|
||||||
return "male";
|
return "sfx-blipmale";
|
||||||
else return f_result;
|
if (!file_exists(get_sfx(f_result)))
|
||||||
|
f_result = "sfx-blip" + f_result;
|
||||||
|
return f_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString AOApplication::get_chat(QString p_char)
|
QString AOApplication::get_chat(QString p_char)
|
||||||
|
Loading…
Reference in New Issue
Block a user