mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Also run monitor blocks every frame
This commit is contained in:
parent
2aef75bc11
commit
cc1678fa9e
1 changed files with 2 additions and 2 deletions
|
@ -478,7 +478,8 @@ class Runtime extends EventEmitter {
|
|||
}, opts);
|
||||
// Remove any existing thread.
|
||||
for (let i = 0; i < this.threads.length; i++) {
|
||||
if (this.threads[i].topBlock === topBlockId) {
|
||||
// Toggling a script that's already running turns it off
|
||||
if (this.threads[i].topBlock === topBlockId && this.threads[i].status !== Thread.STATUS_DONE) {
|
||||
const blockContainer = opts.target.blocks;
|
||||
const opcode = blockContainer.getOpcode(blockContainer.getBlock(topBlockId));
|
||||
|
||||
|
@ -487,7 +488,6 @@ class Runtime extends EventEmitter {
|
|||
// edge activated hat thread that runs every frame
|
||||
continue;
|
||||
}
|
||||
|
||||
this._removeThread(this.threads[i]);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue