mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-27 14:41:12 -04:00
Move is sprite specific verification into VM in a temporary way. Remove monitors when their sprites are deleted.
This commit is contained in:
parent
9048a9b9e7
commit
757dccd565
5 changed files with 52 additions and 0 deletions
src/engine
|
@ -69,6 +69,10 @@ const handleReport = function (
|
|||
}
|
||||
if (thread.updateMonitor) {
|
||||
const targetId = sequencer.runtime.monitorBlocks.getBlock(currentBlockId).targetId;
|
||||
if (targetId && !sequencer.runtime.getTargetById(targetId)) {
|
||||
// Target no longer exists
|
||||
return;
|
||||
}
|
||||
sequencer.runtime.requestUpdateMonitor(Map({
|
||||
id: currentBlockId,
|
||||
spriteName: targetId ? sequencer.runtime.getTargetById(targetId).getName() : null,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue