Skip to content

Commit

Permalink
core: Fix stop() when executing attachMovie in DoInitAction
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kjarosh committed May 21, 2024
1 parent 1b3701e commit cfbb5e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,8 @@ impl Player {
did_finish = LoadManager::preload_tick(context, limit);
}

Self::run_actions(context);

did_finish
})
}
Expand Down

0 comments on commit cfbb5e9

Please sign in to comment.