From cfbb5e96abb438699b157a5d7d44f2c3997d16a0 Mon Sep 17 00:00:00 2001 From: Kamil Jarosz Date: Fri, 17 May 2024 01:13:49 +0200 Subject: [PATCH] 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. --- core/src/player.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/player.rs b/core/src/player.rs index 47a0d84eb8dfe..4c2ca98f5cf98 100644 --- a/core/src/player.rs +++ b/core/src/player.rs @@ -1656,6 +1656,8 @@ impl Player { did_finish = LoadManager::preload_tick(context, limit); } + Self::run_actions(context); + did_finish }) }