Now only allies see the disconnected status

This commit is contained in:
aqw42
2025-05-30 20:37:26 +02:00
parent d4de3e2646
commit 0db4e3b324
+6 -1
View File
@@ -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))
);
}
}