From 0db4e3b324811cb678d911ccb4be72bc3f26dc9b Mon Sep 17 00:00:00 2001 From: aqw42 Date: Fri, 30 May 2025 20:37:26 +0200 Subject: [PATCH] Now only allies see the disconnected status --- src/core/game/GameView.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/game/GameView.ts b/src/core/game/GameView.ts index e04a2776d..7684bcbfe 100644 --- a/src/core/game/GameView.ts +++ b/src/core/game/GameView.ts @@ -293,7 +293,12 @@ export class PlayerView { return this.data.hasSpawned; } isDisconnected(): boolean { - return this.data.isDisconnected; + return ( + this.data.isDisconnected && + this.game.myPlayer() !== null && + (this.isAlliedWith(this.game.myPlayer()!) || + this.game.myPlayer()!.isAlliedWith(this)) + ); } }