core: Same-frame gotos should only proceed on AVM2.
This commit is contained in:
parent
cdfc6f5eae
commit
99003643ac
|
@ -788,17 +788,19 @@ impl<'gc> MovieClip<'gc> {
|
|||
// Clamp frame number in bounds.
|
||||
let frame = frame.max(1);
|
||||
|
||||
if self
|
||||
.0
|
||||
.read()
|
||||
.flags
|
||||
.contains(MovieClipFlags::EXECUTING_AVM2_FRAME_SCRIPT)
|
||||
{
|
||||
// AVM2 does not allow a clip to see while it is executing a frame script.
|
||||
// The goto is instead queued and run once the frame script is completed.
|
||||
self.0.write(context.gc_context).queued_goto_frame = Some(frame);
|
||||
} else {
|
||||
self.run_goto(context, frame, false);
|
||||
if frame != self.current_frame() || context.is_action_script_3() {
|
||||
if self
|
||||
.0
|
||||
.read()
|
||||
.flags
|
||||
.contains(MovieClipFlags::EXECUTING_AVM2_FRAME_SCRIPT)
|
||||
{
|
||||
// AVM2 does not allow a clip to see while it is executing a frame script.
|
||||
// The goto is instead queued and run once the frame script is completed.
|
||||
self.0.write(context.gc_context).queued_goto_frame = Some(frame);
|
||||
} else {
|
||||
self.run_goto(context, frame, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue