bot team fix

This commit is contained in:
1brucben
2025-05-04 22:07:51 +02:00
parent 425d0166f4
commit 0967b4bc3a
2 changed files with 8 additions and 1 deletions
+5 -1
View File
@@ -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 {
+3
View File
@@ -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();
}