0
0
Fork 0

Add proper data to the user join emit

This commit is contained in:
Oliver-Akins 2021-01-01 20:13:25 -07:00
parent 51db315e35
commit 4a9d5cb533

View file

@ -60,7 +60,10 @@ export default (io: Server, socket: Socket, data: JoinGame) => {
let player = new Player(data.name, socket);
game.players.push(player);
socket.emit(`GameJoined`, {});
socket.emit(`GameJoined`, {
status: 200,
players: game.playerData,
});
socket.to(game.id).emit(`PlayerUpdate`, {
status: 200,
action: "new",