Skip to content

Commit fb7b8af

Browse files
Wait for another frame if this one was too quick, I guess
1 parent 3eb3023 commit fb7b8af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/src/game.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ class Game {
259259

260260
context.restore();
261261

262-
window.requestAnimationFrame(this.frame);
262+
setTimeout((): void => { window.requestAnimationFrame(this.frame); }, Game.tickPeriod * 1000 - delta);
263263
}
264264

265265
//

0 commit comments

Comments
 (0)