Make shout, verdict and wtce default duration values into constants
This commit is contained in:
parent
8027bbffad
commit
bb8edab579
@ -311,6 +311,15 @@ private:
|
||||
//every time point in char.inis times this equals the final time
|
||||
const int time_mod = 40;
|
||||
|
||||
//the amount of time non-animated objection/hold it/takethat images stay onscreen for in ms
|
||||
const int shout_stay_time = 724;
|
||||
|
||||
//the amount of time non-animated guilty/not guilty images stay onscreen for in ms
|
||||
const int verdict_stay_time = 3000;
|
||||
|
||||
//the amount of time non-animated witness testimony/cross-examination images stay onscreen for in ms
|
||||
const int wtce_stay_time = 1500;
|
||||
|
||||
static const int chatmessage_size = 23;
|
||||
QString m_chatmessage[chatmessage_size];
|
||||
bool chatmessage_is_empty = false;
|
||||
|
@ -1330,22 +1330,22 @@ void Courtroom::handle_chatmessage(QStringList *p_contents)
|
||||
switch (objection_mod)
|
||||
{
|
||||
case 1:
|
||||
ui_vp_objection->play("holdit", f_char, f_custom_theme, 724);
|
||||
ui_vp_objection->play("holdit", f_char, f_custom_theme, shout_stay_time);
|
||||
objection_player->play("holdit.wav", f_char, f_custom_theme);
|
||||
break;
|
||||
case 2:
|
||||
ui_vp_objection->play("objection", f_char, f_custom_theme, 724);
|
||||
ui_vp_objection->play("objection", f_char, f_custom_theme, shout_stay_time);
|
||||
objection_player->play("objection.wav", f_char, f_custom_theme);
|
||||
if (ao_app->objection_stop_music())
|
||||
music_player->play(""); //I'd prefer if this sent a networked message instead so everyone would have their music cut when you object.
|
||||
break;
|
||||
case 3:
|
||||
ui_vp_objection->play("takethat", f_char, f_custom_theme, 724);
|
||||
ui_vp_objection->play("takethat", f_char, f_custom_theme, shout_stay_time);
|
||||
objection_player->play("takethat.wav", f_char, f_custom_theme);
|
||||
break;
|
||||
//case 4 is AO2 only
|
||||
case 4:
|
||||
ui_vp_objection->play("custom", f_char, f_custom_theme, 724);
|
||||
ui_vp_objection->play("custom", f_char, f_custom_theme, shout_stay_time);
|
||||
objection_player->play("custom.wav", f_char, f_custom_theme);
|
||||
break;
|
||||
default:
|
||||
@ -2524,14 +2524,14 @@ void Courtroom::handle_wtce(QString p_wtce, int variant)
|
||||
if (p_wtce == "testimony1")
|
||||
{
|
||||
sfx_player->play(ao_app->get_sfx("witness_testimony"));
|
||||
ui_vp_wtce->play("witnesstestimony", "", "", 1500);
|
||||
ui_vp_wtce->play("witnesstestimony", "", "", wtce_stay_time);
|
||||
ui_vp_testimony->play("testimony");
|
||||
}
|
||||
//cross examination
|
||||
else if (p_wtce == "testimony2")
|
||||
{
|
||||
sfx_player->play(ao_app->get_sfx("cross_examination"));
|
||||
ui_vp_wtce->play("crossexamination", "", "", 1500);
|
||||
ui_vp_wtce->play("crossexamination", "", "", wtce_stay_time);
|
||||
ui_vp_testimony->stop();
|
||||
}
|
||||
else if (p_wtce == "judgeruling")
|
||||
@ -2539,12 +2539,12 @@ void Courtroom::handle_wtce(QString p_wtce, int variant)
|
||||
if (variant == 0)
|
||||
{
|
||||
sfx_player->play(ao_app->get_sfx("not_guilty"));
|
||||
ui_vp_wtce->play("notguilty", "", "", 3000);
|
||||
ui_vp_wtce->play("notguilty", "", "", verdict_stay_time);
|
||||
ui_vp_testimony->stop();
|
||||
}
|
||||
else if (variant == 1) {
|
||||
sfx_player->play(ao_app->get_sfx("guilty"));
|
||||
ui_vp_wtce->play("guilty", "", "", 3000);
|
||||
ui_vp_wtce->play("guilty", "", "", verdict_stay_time);
|
||||
ui_vp_testimony->stop();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user