Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

Commit

Permalink
fix: sanity check
Browse files Browse the repository at this point in the history
  • Loading branch information
leia-uwu committed Oct 1, 2024
1 parent ed5e7ea commit 18e5cdc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/src/game/gameProcessManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ class GameProcess implements GameData {
this.canJoin = msg.canJoin;
this.gameModeIdx = msg.gameModeIdx;
this.teamMode = msg.teamMode;
this.id = msg.id;
if (this.id !== msg.id) {
this.manager.processById.delete(this.id);
this.id = msg.id;
this.manager.processById.set(this.id, this);
}
this.aliveCount = msg.aliveCount;
this.startedTime = msg.startedTime;
this.stopped = msg.stopped;
Expand Down

0 comments on commit 18e5cdc

Please sign in to comment.