on master help sign in
fix for the clock but it broke mario
ab1ba45Michael James
runtime/Debugger.js+4
@@ -180,6 +180,10 @@ function debugModule(module, runtime) {
180 var lastSnapshotPosition = Math.floor(position / EVENTS_PER_SAVE);
180 var lastSnapshotPosition = Math.floor(position / EVENTS_PER_SAVE);
181 eventsUntilSnapshot = EVENTS_PER_SAVE - (position % EVENTS_PER_SAVE);
181 eventsUntilSnapshot = EVENTS_PER_SAVE - (position % EVENTS_PER_SAVE);
182 snapshots = snapshots.slice(0, lastSnapshotPosition + 1);
182 snapshots = snapshots.slice(0, lastSnapshotPosition + 1);
183+
184+ var lastEventTime = recordedEvents[position-1].timestep;
185+ runtime.timer.setDelay(Date.now() - lastEventTime);
186+
183 recordedEvents = recordedEvents.slice(0, position);
187 recordedEvents = recordedEvents.slice(0, position);
184 tracePath.clearTracesAfter(position);
188 tracePath.clearTracesAfter(position);
185 eventCounter = position;
189 eventCounter = position;
runtime/Init.js+6
@@ -49,8 +49,14 @@ function init(display, container, module, ports, moduleToReplace) {
49 return inducedDelay;
49 return inducedDelay;
50 }
50 }
51
51
52+ var setDelay = function(d) {
53+ inducedDelay = d;
54+ return inducedDelay;
55+ }
56+
52 return { now : now
57 return { now : now
53 , addDelay : addDelay
58 , addDelay : addDelay
59+ , setDelay : setDelay
54 }
60 }
55 }();
61 }();
56
62