From 0967b4bc3a7a76c32f8e8221f8ab1c67b7e1dd22 Mon Sep 17 00:00:00 2001 From: 1brucben <1benjbruce@gmail.com> Date: Sun, 4 May 2025 22:07:51 +0200 Subject: [PATCH] bot team fix --- src/core/game/GameView.ts | 6 +++++- src/core/game/PlayerImpl.ts | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/core/game/GameView.ts b/src/core/game/GameView.ts index 877ec19cf..04d7d9666 100644 --- a/src/core/game/GameView.ts +++ b/src/core/game/GameView.ts @@ -240,7 +240,11 @@ export class PlayerView { } isOnSameTeam(other: PlayerView): boolean { - return this.data.team != null && this.data.team == other.data.team; + return ( + this.data.team !== null && + this.data.team === other.data.team && + this.data.playerType !== PlayerType.Bot + ); } isFriendly(other: PlayerView): boolean { diff --git a/src/core/game/PlayerImpl.ts b/src/core/game/PlayerImpl.ts index 42e8ce988..df12171de 100644 --- a/src/core/game/PlayerImpl.ts +++ b/src/core/game/PlayerImpl.ts @@ -614,6 +614,9 @@ export class PlayerImpl implements Player { if (this.team() == null || other.team() == null) { return false; } + if (this.team() == Team.Bot) { + return false; + } return this._team == other.team(); }