mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-06-28 23:30:22 -04:00
Don't serialize or load monitor values
This commit is contained in:
parent
d01f04bd3e
commit
08a1267a41
1 changed files with 5 additions and 1 deletions
|
@ -500,7 +500,6 @@ const serializeMonitors = function (monitors) {
|
||||||
opcode: monitorData.opcode,
|
opcode: monitorData.opcode,
|
||||||
params: monitorData.params,
|
params: monitorData.params,
|
||||||
spriteName: monitorData.spriteName,
|
spriteName: monitorData.spriteName,
|
||||||
value: monitorData.value,
|
|
||||||
width: monitorData.width,
|
width: monitorData.width,
|
||||||
height: monitorData.height,
|
height: monitorData.height,
|
||||||
x: monitorData.x,
|
x: monitorData.x,
|
||||||
|
@ -1189,6 +1188,11 @@ const deserializeMonitor = function (monitorData, runtime, targets, extensions)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Don't load potentially stale monitor data
|
||||||
|
// e.g. loudness, answer, timer, and other blocks which depend on global or external state,
|
||||||
|
// as well as values which were updated whilst the monitor was hidden
|
||||||
|
monitorData.value = null;
|
||||||
|
|
||||||
runtime.requestAddMonitor(MonitorRecord(monitorData));
|
runtime.requestAddMonitor(MonitorRecord(monitorData));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue