simplified leaving group when silent

This commit is contained in:
Piotr 'pwh' Hanusiak 2022-04-20 15:22:53 +02:00
parent a8d56263ea
commit b0be00c020

View File

@ -206,9 +206,8 @@ export class GameRoom {
} }
updatePlayerDetails(user: User, playerDetailsMessage: SetPlayerDetailsMessage) { updatePlayerDetails(user: User, playerDetailsMessage: SetPlayerDetailsMessage) {
const isSilent = user.silent;
user.updateDetails(playerDetailsMessage); user.updateDetails(playerDetailsMessage);
if (!isSilent && user.group !== undefined && user.silent) { if (user.group !== undefined && user.silent) {
this.leaveGroup(user); this.leaveGroup(user);
} }
} }