avm1: Run Player::run_actions after every timer callback.

This commit is contained in:
desuwa 2021-04-15 00:00:16 +02:00 committed by Mike Welsh
parent 71a17166f4
commit 3030f2098a
2 changed files with 3 additions and 1 deletions

View File

@ -111,6 +111,8 @@ impl<'gc> Timers<'gc> {
base_proto,
&params,
);
crate::player::Player::run_actions(&mut activation.context);
}
let mut timer = activation.context.timers.peek_mut().unwrap();

View File

@ -1066,7 +1066,7 @@ impl Player {
&self.locale
}
fn run_actions<'gc>(context: &mut UpdateContext<'_, 'gc, '_>) {
pub fn run_actions<'gc>(context: &mut UpdateContext<'_, 'gc, '_>) {
// Note that actions can queue further actions, so a while loop is necessary here.
while let Some(actions) = context.action_queue.pop_action() {
// We don't run frame actions if the clip was removed after it queued the action.