diff --git a/src/core/game/PlayerImpl.ts b/src/core/game/PlayerImpl.ts index d9ba8ba7c..75a3afcf9 100644 --- a/src/core/game/PlayerImpl.ts +++ b/src/core/game/PlayerImpl.ts @@ -390,6 +390,13 @@ export class PlayerImpl implements Player { if (other === this) { return false; } + if (this.isDisconnected() || other.isDisconnected()) { + // Disconnected players are marked as not-friendly even if they are allies, + // so we need to return early if either player is disconnected. + // Otherise we could end up sending an alliance request to someone + // we are already allied with. + return false; + } if (this.isFriendly(other) || !this.isAlive()) { return false; }