1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2024-10-27 20:34:29 +00:00

minor fps fix

This commit is contained in:
EmeraldBlock 2021-11-20 17:26:52 -06:00
parent 679e7f168c
commit a193867e53

View File

@ -42,7 +42,7 @@ export class DynamicTickrate {
const now = performance.now();
const timeDuration = now - this.accumulatedFpsLastUpdate;
if (timeDuration > fpsAccumulationTime) {
const avgFps = (this.accumulatedFps / fpsAccumulationTime) * 1000;
const avgFps = (this.accumulatedFps / timeDuration) * 1000;
this.averageFps = avgFps;
this.accumulatedFps = 0;
this.accumulatedFpsLastUpdate = now;