fix: prediction
This commit is contained in:
parent
40cb5b8610
commit
b0be192381
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user