This commit is contained in:
Evert Prants 2022-04-09 14:37:28 +03:00
parent 9267e50415
commit 1be31684d6
Signed by: evert
GPG Key ID: 1688DA83D222D0B5

View File

@ -53,10 +53,12 @@ export class Game {
socket.emit('me', publicUserInfo); socket.emit('me', publicUserInfo);
socket.emit( socket.emit(
'players', 'players',
this._connections.map((conn) => ({ this._connections
...this.mapPlayer(conn.data.user), .filter((player) => player.data.user)
...conn.data.playerinfo, .map((conn) => ({
})), ...this.mapPlayer(conn.data.user),
...conn.data.playerinfo,
})),
); );
socket.broadcast.emit('playerjoin', publicUserInfo); socket.broadcast.emit('playerjoin', publicUserInfo);