fix: track desynced clients as live set instead of accumulating count

This commit is contained in:
evanpelle
2026-03-11 14:35:25 -07:00
parent e922d336a1
commit fee625801d
2 changed files with 8 additions and 9 deletions
+4 -5
View File
@@ -104,11 +104,10 @@ export class GameManager {
}
desyncCount(): number {
let totalDesyncs = 0;
this.games.forEach((game: GameServer) => {
totalDesyncs += game.desyncCount;
});
return totalDesyncs;
return [...this.games.values()].reduce(
(acc, game) => acc + game.numDesyncedClients(),
0,
);
}
tick() {