mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-26 02:04:36 +00:00
bot team fix
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user