fix: prediction

This commit is contained in:
cha0s 2019-03-27 17:40:25 -05:00
parent 40cb5b8610
commit b0be192381

View File

@ -66,10 +66,10 @@ const predictionHandle = setInterval(() => {
const now = performance.now();
const elapsed = (now - lastTime) / 1000;
lastTime = now;
// if (hasSelfEntity()) {
// selfEntity.inputState = actionState.toJS();
// }
// room.tick(elapsed);
if (hasSelfEntity()) {
selfEntity.inputState = actionState.toJS();
}
room.tick(elapsed);
}, 1000 / 80);
// State updates.
let dirty = false;