0
0
Fork 0

Send a player list back when the game is created or joined

This commit is contained in:
Oliver-Akins 2021-01-01 15:54:47 -07:00
parent 33608a9849
commit 7f93f2730c
2 changed files with 3 additions and 2 deletions

View file

@ -63,7 +63,8 @@ export default (io: Server, socket: Socket, data: JoinGame) => {
socket.emit(`GameJoined`, {});
socket.to(game.id).emit(`PlayerUpdate`, {
action: "new",
name: player.name
name: player.name,
players: game.playerData,
});
}
catch (err) {