适配新版玩家连接状态修改方式
This commit is contained in:
@@ -506,8 +506,9 @@ function NET.updateWS_stream()
|
|||||||
NET.unlock('wsc_stream')
|
NET.unlock('wsc_stream')
|
||||||
NET.roomInfo.connectingStream=false
|
NET.roomInfo.connectingStream=false
|
||||||
NET.roomInfo.waitingStream=true
|
NET.roomInfo.waitingStream=true
|
||||||
netPLY.setConnect(USER.uid)
|
for _,uid in next,d.connected do
|
||||||
netPLY.freshStreamConn(res.data.connected)
|
netPLY.setConnect(uid)
|
||||||
|
end
|
||||||
elseif res.action==0 then--Game start
|
elseif res.action==0 then--Game start
|
||||||
NET.roomInfo.waitingStream=false
|
NET.roomInfo.waitingStream=false
|
||||||
NET.roomInfo.start=true
|
NET.roomInfo.start=true
|
||||||
@@ -515,7 +516,9 @@ function NET.updateWS_stream()
|
|||||||
elseif res.action==1 then--Game finished
|
elseif res.action==1 then--Game finished
|
||||||
--?
|
--?
|
||||||
elseif res.action==2 then--Player join
|
elseif res.action==2 then--Player join
|
||||||
netPLY.setConnect(d.uid)
|
if not d.watch then
|
||||||
|
netPLY.setConnect(d.uid)
|
||||||
|
end
|
||||||
elseif res.action==3 then--Player leave
|
elseif res.action==3 then--Player leave
|
||||||
--?
|
--?
|
||||||
elseif res.action==4 then--Player died
|
elseif res.action==4 then--Player died
|
||||||
|
|||||||
@@ -133,11 +133,6 @@ function netPLY.setConnect(uid)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function netPLY.freshStreamConn(list)
|
|
||||||
for _,p in next,list do
|
|
||||||
getPLY(p.uid).connected=true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function netPLY.resetState()
|
function netPLY.resetState()
|
||||||
for i=1,#PLY do
|
for i=1,#PLY do
|
||||||
PLY[i].ready=false
|
PLY[i].ready=false
|
||||||
|
|||||||
Reference in New Issue
Block a user