联网推进(整理代码)
This commit is contained in:
@@ -297,19 +297,19 @@ function NET.updateWS_play()
|
|||||||
TABLE.clear(PLY_NET)
|
TABLE.clear(PLY_NET)
|
||||||
ins(PLY_NET,{
|
ins(PLY_NET,{
|
||||||
uid=USER.uid,
|
uid=USER.uid,
|
||||||
name=USER.username,
|
username=USER.username,
|
||||||
conf=dumpBasicConfig(),
|
|
||||||
sid=data.sid,
|
sid=data.sid,
|
||||||
ready=data.ready,
|
ready=data.ready,
|
||||||
|
conf=dumpBasicConfig(),
|
||||||
})
|
})
|
||||||
if data.players then
|
if data.players then
|
||||||
for _,p in next,data.players do
|
for _,p in next,data.players do
|
||||||
ins(PLY_NET,{
|
ins(PLY_NET,{
|
||||||
sid=p.sid,
|
|
||||||
uid=p.uid,
|
uid=p.uid,
|
||||||
name=p.username,
|
username=p.username,
|
||||||
conf=p.config,
|
sid=p.sid,
|
||||||
ready=p.ready,
|
ready=p.ready,
|
||||||
|
conf=p.config,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -318,11 +318,11 @@ function NET.updateWS_play()
|
|||||||
else
|
else
|
||||||
--Load other players
|
--Load other players
|
||||||
ins(PLY_NET,{
|
ins(PLY_NET,{
|
||||||
sid=data.sid,
|
|
||||||
uid=data.uid,
|
uid=data.uid,
|
||||||
name=data.username,
|
username=data.username,
|
||||||
conf=data.config,
|
sid=data.sid,
|
||||||
ready=data.ready,
|
ready=data.ready,
|
||||||
|
conf=data.config,
|
||||||
})
|
})
|
||||||
SCN.socketRead("Join",res.data)
|
SCN.socketRead("Join",res.data)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -383,12 +383,12 @@ function PLY.newRemotePlayer(id,mini,data)
|
|||||||
P.streamProgress=1
|
P.streamProgress=1
|
||||||
|
|
||||||
data.p=P
|
data.p=P
|
||||||
P.userName=data.name
|
|
||||||
P.userID=data.uid
|
P.userID=data.uid
|
||||||
|
P.userName=data.username
|
||||||
P.subID=data.sid
|
P.subID=data.sid
|
||||||
P.ready=data.ready
|
P.ready=data.ready
|
||||||
|
|
||||||
loadRemoteEnv(P,data.conf)
|
loadRemoteEnv(P,data.conf)
|
||||||
|
|
||||||
applyGameEnv(P)
|
applyGameEnv(P)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user