core: Only force-queue frame scripts if the goto is not a no-op.

This commit is contained in:
David Wendt 2022-02-01 19:50:56 -05:00 committed by kmeisthax
parent ac2b82f26e
commit 3677a0107b
1 changed files with 6 additions and 3 deletions

View File

@ -1393,8 +1393,6 @@ impl<'gc> MovieClip<'gc> {
self.assert_expected_tag_start(); self.assert_expected_tag_start();
} }
let from_frame = self.current_frame();
// Flash gotos are tricky: // Flash gotos are tricky:
// 1) Conceptually, a goto should act like the playhead is advancing forward or // 1) Conceptually, a goto should act like the playhead is advancing forward or
// backward to a frame. // backward to a frame.
@ -1426,6 +1424,8 @@ impl<'gc> MovieClip<'gc> {
false false
}; };
let from_frame = self.current_frame();
// Step through the intermediate frames, and aggregate the deltas of each frame. // Step through the intermediate frames, and aggregate the deltas of each frame.
let mc = self.0.read(); let mc = self.0.read();
let tag_stream_start = mc.static_data.swf.as_ref().as_ptr() as u64; let tag_stream_start = mc.static_data.swf.as_ref().as_ptr() as u64;
@ -1611,8 +1611,11 @@ impl<'gc> MovieClip<'gc> {
if context.is_action_script_3() { if context.is_action_script_3() {
let mut write = self.0.write(context.gc_context); let mut write = self.0.write(context.gc_context);
write.queued_script_frame = Some(clamped_frame); write.queued_script_frame = Some(clamped_frame);
if write.current_frame != from_frame {
write.last_queued_script_frame = None; write.last_queued_script_frame = None;
} }
}
// Next, run the final frame for the parent clip. // Next, run the final frame for the parent clip.
// Re-run the final frame without display tags (DoAction, StartSound, etc.) // Re-run the final frame without display tags (DoAction, StartSound, etc.)