This commit is contained in:
legop3
2025-11-17 14:29:15 -05:00
parent 922f0b1188
commit fb04103593
9 changed files with 102 additions and 13 deletions
+9
View File
@@ -64,6 +64,15 @@ managerEvents.on('lock', ({ roverId, locked }) => {
syncAll();
});
managerEvents.on('driver', ({ socketId }) => {
if (!socketId) return;
const socket = io.sockets.sockets.get(socketId);
if (socket) {
logger.info('Driver assignment change; syncing session', socketId);
syncSocket(socket);
}
});
turnEvents.on('activeDriver', () => {
logger.info('Active driver change; syncing all clients');
syncAll();