core: Fix stop() when executing attachMovie in DoInitAction

This fixes a bug where the code in the first frame of a movie clip
could have been executed after the second frame
(so that instructions like stop did not work properly).

That is because when the first frame was executed in preload
(e.g. for a sprite attached using attachMovie), the actions were queued,
the second frame was executed in run_frame, and then the actions from
the first frame were executed.

Ensuring that all actions are executed after preload fixes this issue.
This commit is contained in:
Kamil Jarosz 2024-05-17 01:13:49 +02:00 committed by Nathan Adams
parent 2532d7e927
commit c32b27c294
1 changed files with 2 additions and 0 deletions

View File

@ -1657,6 +1657,8 @@ impl Player {
did_finish = LoadManager::preload_tick(context, limit);
}
Self::run_actions(context);
did_finish
})
}