正确更新房间allReady状态

This commit is contained in:
MrZ_26
2022-10-24 14:10:58 +08:00
parent b0acdce294
commit 2480987f10
2 changed files with 5 additions and 4 deletions

View File

@@ -44,8 +44,5 @@ return{
N=N+1
end
end
for i=1,#PLY_ALIVE do
MES.new('info',PLY_ALIVE[i].uid.." "..PLY_ALIVE[i].sid,5)
end
end,
}

View File

@@ -622,6 +622,7 @@ function NET.wsCallBack.room_enter(body)
config=p.config,
}
end
NET.freshRoomAllReady()
else
local p=body.data
NETPLY.add{
@@ -631,7 +632,10 @@ function NET.wsCallBack.room_enter(body)
config=p.config,
}
NET.textBox:push{COLOR.Y,text.joinRoom:repD(USERS.getUsername(p.playerId).."#"..p.playerId.." ")}
SFX.play('connected')
if not GAME.playing then
SFX.play('connected')
NET.freshRoomAllReady()
end
end
WAIT.interrupt()