Skip to content

Commit 0ee6888

Browse files
author
in1tiate
committed
prevent static preanims from playing
1 parent f1aa57b commit 0ee6888

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/aolayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ void CharLayer::start_playback(QString p_image)
261261
void AOLayer::start_playback(QString p_image)
262262
{
263263
this->show();
264-
264+
265265
if (!ao_app->is_continuous_enabled()) {
266266
continuous = false;
267267
force_continuous = true;

src/courtroom.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3109,6 +3109,15 @@ void Courtroom::play_preanim(bool immediate)
31093109
qDebug() << "W: could not find " + anim_to_find;
31103110
return;
31113111
}
3112+
else {
3113+
QImageReader s_reader = QImageReader(anim_to_find);
3114+
int image_count = s_reader.imageCount();
3115+
if (image_count <= 1) {
3116+
preanim_done();
3117+
qDebug() << "W: tried to play static preanim " + anim_to_find;
3118+
return;
3119+
}
3120+
}
31123121
ui_vp_player_char->set_static_duration(preanim_duration);
31133122
ui_vp_player_char->set_play_once(true);
31143123
ui_vp_player_char->load_image(f_preanim, f_char, preanim_duration, true);

0 commit comments

Comments
 (0)