diff --git a/app/client/interpolator.js b/app/client/interpolator.js index 5339c7a..7a248e3 100644 --- a/app/client/interpolator.js +++ b/app/client/interpolator.js @@ -7,6 +7,7 @@ export default class Interpolator { accept(state) { const packet = state; if ('Tick' !== packet.type) { + postMessage(packet); return; } this.penultimate = this.latest; @@ -93,7 +94,7 @@ const interpolate = (now) => { onmessage = async (event) => { interpolator.accept(event.data); - if (interpolator.penultimate) { + if (interpolator.penultimate && 'Tick' === event.data.type) { postMessage({ type: 'Tick', payload: {