mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-01 04:53:26 +00:00
Fix the stale disconnected (Zzz) icon persisting when a client reconnects (#1631)
Fix the stale disconnected (Zzz) icon persisting when a client reconnects ## Description: Refer to issue #1630 This change modifies the GameServer.addClient function to send the mark_disconnected = false intent when a client that was previously disconnected gets replaced by a newly joined client with the same clientID. Under the old logic, this mark_disconnected = false intent is not sent if the client was disconnected for longer than 60 seconds before reconnecting. https://github.com/user-attachments/assets/5e0ce1c3-9519-4f39-aa80-e46f1275649c Left side browser (player with red tiles) is the disconnected client that was disconnected at 00:14 game clock time. It reconnected around 03:56 game clock time. Right side browser (player with green tiles) is the other client. Use the game clock time from the right side for the live game clock time. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I have read and accepted the CLA agreement (only required once). ## Please put your Discord username so you can be contacted if a bug or regression is found: slyty --------- Co-authored-by: Drills Kibo <59177241+drillskibo@users.noreply.github.com>
This commit is contained in:
@@ -5,7 +5,6 @@ import { ClientID } from "../core/Schemas";
|
||||
|
||||
export class Client {
|
||||
public lastPing: number = Date.now();
|
||||
public isDisconnected: boolean = false;
|
||||
|
||||
public hashes: Map<Tick, number> = new Map();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user