From 73166378345e2734cf00e583fa0f23241ac1a826 Mon Sep 17 00:00:00 2001 From: Piotr 'pwh' Hanusiak Date: Tue, 10 May 2022 16:50:08 +0200 Subject: [PATCH] make sure the user we try to get inside the group is not silent --- back/src/Model/Group.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/src/Model/Group.ts b/back/src/Model/Group.ts index 2ed6c695..5fc86443 100644 --- a/back/src/Model/Group.ts +++ b/back/src/Model/Group.ts @@ -128,7 +128,7 @@ export class Group implements Movable { for (const user of this.positionNotifier.getAllUsersInSquareAroundZone(this.currentZone)) { // Todo: Merge two groups with a leader - if (user.group || this.isFull()) return; //we ignore users that are already in a group. + if (user.silent || user.group || this.isFull()) return; //we ignore users that are already in a group. const distance = GameRoom.computeDistanceBetweenPositions(user.getPosition(), this.getPosition()); if (distance < this.groupRadius) { this.join(user);