mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-26 22:20:41 -04:00
Fix issues uncovered where clones were triggering automatically on create.
This commit is contained in:
parent
6c4fb29523
commit
e5b00dfd95
3 changed files with 10 additions and 2 deletions
src/engine
|
@ -63,11 +63,13 @@ const handleReport = function (resolvedValue, sequencer, thread, blockCached, la
|
|||
// true and used to be false, or the stack was activated explicitly
|
||||
// via stack click
|
||||
if (!thread.stackClick) {
|
||||
const hasOldEdgeValue = thread.target.hasEdgeActivatedValue(currentBlockId);
|
||||
const oldEdgeValue = thread.target.updateEdgeActivatedValue(
|
||||
currentBlockId,
|
||||
resolvedValue
|
||||
);
|
||||
const edgeWasActivated = !oldEdgeValue && resolvedValue;
|
||||
|
||||
const edgeWasActivated = hasOldEdgeValue ? (!oldEdgeValue && resolvedValue) : resolvedValue;
|
||||
if (!edgeWasActivated) {
|
||||
sequencer.retireThread(thread);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue