prevent static preanims from playing
This commit is contained in:
		
							parent
							
								
									f1aa57b125
								
							
						
					
					
						commit
						0ee6888dec
					
				@ -261,7 +261,7 @@ void CharLayer::start_playback(QString p_image)
 | 
				
			|||||||
void AOLayer::start_playback(QString p_image)
 | 
					void AOLayer::start_playback(QString p_image)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  this->show();
 | 
					  this->show();
 | 
				
			||||||
  
 | 
					
 | 
				
			||||||
  if (!ao_app->is_continuous_enabled()) {
 | 
					  if (!ao_app->is_continuous_enabled()) {
 | 
				
			||||||
    continuous = false;
 | 
					    continuous = false;
 | 
				
			||||||
    force_continuous = true;
 | 
					    force_continuous = true;
 | 
				
			||||||
 | 
				
			|||||||
@ -3109,6 +3109,15 @@ void Courtroom::play_preanim(bool immediate)
 | 
				
			|||||||
    qDebug() << "W: could not find " + anim_to_find;
 | 
					    qDebug() << "W: could not find " + anim_to_find;
 | 
				
			||||||
    return;
 | 
					    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_static_duration(preanim_duration);
 | 
				
			||||||
  ui_vp_player_char->set_play_once(true);
 | 
					  ui_vp_player_char->set_play_once(true);
 | 
				
			||||||
  ui_vp_player_char->load_image(f_preanim, f_char, preanim_duration, true);
 | 
					  ui_vp_player_char->load_image(f_preanim, f_char, preanim_duration, true);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user