diff options
| author | in1tiate <radwoodward@vikings.grayson.edu> | 2021-02-20 04:30:09 -0600 |
|---|---|---|
| committer | in1tiate <radwoodward@vikings.grayson.edu> | 2021-02-20 04:30:09 -0600 |
| commit | 0ee6888dec0bc653468a9a24896e20d5de69ba06 (patch) | |
| tree | 32b5461bd259684996d2720dd580052f088f2bac | |
| parent | f1aa57b1253ed267c1cab3c32a1ffc38ad29e854 (diff) | |
prevent static preanims from playing
| -rw-r--r-- | src/aolayer.cpp | 2 | ||||
| -rw-r--r-- | src/courtroom.cpp | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/aolayer.cpp b/src/aolayer.cpp index 0488364f..f0d5779e 100644 --- a/src/aolayer.cpp +++ b/src/aolayer.cpp @@ -261,7 +261,7 @@ void CharLayer::start_playback(QString p_image) void AOLayer::start_playback(QString p_image) { this->show(); - + if (!ao_app->is_continuous_enabled()) { continuous = false; force_continuous = true; diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 70cc0ffc..014bd7b1 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -3109,6 +3109,15 @@ void Courtroom::play_preanim(bool immediate) qDebug() << "W: could not find " + anim_to_find; return; } + else { + QImageReader s_reader = QImageReader(anim_to_find); + int image_count = s_reader.imageCount(); + if (image_count <= 1) { + preanim_done(); + qDebug() << "W: tried to play static preanim " + anim_to_find; + return; + } + } ui_vp_player_char->set_static_duration(preanim_duration); ui_vp_player_char->set_play_once(true); ui_vp_player_char->load_image(f_preanim, f_char, preanim_duration, true); |
