Commit 926084fb authored by 范雪寒's avatar 范雪寒

fix: bugs

parent fbf91a7c
...@@ -418,7 +418,7 @@ cc.Class({ ...@@ -418,7 +418,7 @@ cc.Class({
this.networkHelper.on("playerJoin", (event) => { this.networkHelper.on("playerJoin", (event) => {
if (this.server) { if (this.server) {
this.server.onPlayerJoin(event); this.server.onPlayerJoin({ data: { joinPlayerId: event.playerId } });
} }
cc.log("playerJoin" + JSON.stringify(event)); cc.log("playerJoin" + JSON.stringify(event));
}); });
...@@ -474,7 +474,7 @@ cc.Class({ ...@@ -474,7 +474,7 @@ cc.Class({
); );
} }
}); });
if (item.data.playerData.find(player => player.uuid == this.playerId)) { if (item.data.playerData.find(player => player.uuid == this.playerId && player.complete)) {
item.data.playerData.sort((a, b) => { item.data.playerData.sort((a, b) => {
return a.duration - b.duration; return a.duration - b.duration;
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment