diff --git a/include/aocharmovie.h b/include/aocharmovie.h index 7ef7da3..f54f510 100644 --- a/include/aocharmovie.h +++ b/include/aocharmovie.h @@ -36,7 +36,7 @@ private: QVector movie_frames; QTimer *preanim_timer; - const int time_mod = 62; + const int time_mod = 60; // These are the X and Y values before they are fixed based on the sprite's width. int x = 0; diff --git a/src/aocharmovie.cpp b/src/aocharmovie.cpp index 90baa55..ac12f63 100644 --- a/src/aocharmovie.cpp +++ b/src/aocharmovie.cpp @@ -75,6 +75,7 @@ void AOCharMovie::play_pre(QString p_char, QString p_emote, int duration) for (int n_frame = 0 ; n_frame < m_movie->frameCount() ; ++n_frame) { + qDebug() << "frame " << n_frame << " delay of " << m_movie->nextFrameDelay(); real_duration += m_movie->nextFrameDelay(); m_movie->jumpToFrame(n_frame + 1); } @@ -86,7 +87,7 @@ void AOCharMovie::play_pre(QString p_char, QString p_emote, int duration) double percentage_modifier = 100.0; - if (real_duration != 0 && duration != 0) + if (real_duration != 0 && duration > 0) { double modifier = full_duration / static_cast(real_duration); percentage_modifier = 100 / modifier; @@ -116,12 +117,6 @@ void AOCharMovie::play_pre(QString p_char, QString p_emote, int duration) void AOCharMovie::play_talking(QString p_char, QString p_emote) { - QString emote_path = ao_app->get_character_path(p_char, "(b)" + p_emote); - - m_movie->stop(); - this->clear(); - m_movie->setFileName(emote_path); - play_once = false; m_movie->setSpeed(100); play(p_char, p_emote, "(b)"); @@ -129,12 +124,6 @@ void AOCharMovie::play_talking(QString p_char, QString p_emote) void AOCharMovie::play_idle(QString p_char, QString p_emote) { - QString emote_path = ao_app->get_character_path(p_char, "(a)" + p_emote); - - m_movie->stop(); - this->clear(); - m_movie->setFileName(emote_path); - play_once = false; m_movie->setSpeed(100); play(p_char, p_emote, "(a)"); diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 477f395..47e3a0e 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -2049,8 +2049,7 @@ void Courtroom::play_preanim(bool noninterrupting) sfx_delay_timer->start(sfx_delay); QString anim_to_find = ao_app->get_image_suffix(ao_app->get_character_path(f_char, f_preanim)); - if (!file_exists(anim_to_find) || - preanim_duration < 0) + if (!file_exists(anim_to_find)) { if (noninterrupting) anim_state = 4;