diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-04-03 23:10:46 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-04-18 10:06:13 +0200 |
commit | 58d8b4e1fec0692bbc78db73c54385f5efbe3e8f (patch) | |
tree | 1649dd6dca575775ec76ff6c2915c26b6207b506 /server.js | |
parent | 8f95aa8d593c284a153a20e01ef3050343118c05 (diff) | |
download | server-58d8b4e1fec0692bbc78db73c54385f5efbe3e8f.tar.gz |
Only send required information in "players" message.
Diffstat (limited to 'server.js')
-rw-r--r-- | server.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2368,7 +2368,7 @@ wss.on('connection', (socket, req, client) => { } if (socket.seen === 0) - send_message(socket, 'players', [socket.role, players]) + send_message(socket, 'players', [socket.role, players.map(p => ({ name: p.name, role: p.role }))]) if (game_clients[socket.game_id]) game_clients[socket.game_id].push(socket) |