Move is sprite specific verification into VM in a temporary way. Remove monitors when their sprites are deleted.

This commit is contained in:
DD 2017-11-14 18:25:54 -05:00
parent 9048a9b9e7
commit 757dccd565
5 changed files with 52 additions and 0 deletions
src/engine

View file

@ -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,