mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-29 02:45:18 +00:00
fix: track desynced clients as live set instead of accumulating count
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user