浏览代码

Adds timestamp to moves

Nikatlas 6 年之前
父节点
当前提交
019ddd0da3
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      services/matchmaking/randomFree.js

+ 1 - 0
services/matchmaking/randomFree.js

@@ -56,6 +56,7 @@ class randomFree {
                     p2.emit('joinGame', matchInfo.playerTwoState);
 
                     const broadcast = (data) => {
+                    	data.timestamp = new Date().getTime();
                     	nsp.in(channel).emit('move', data);	
                     };
                     p1.on('broadcast', broadcast);