房间内玩家对象管理单独做进新模块netPlayer,为未来消息气泡和发表情做准备

This commit is contained in:
MrZ626
2021-05-04 02:21:52 +08:00
parent a21e7a5e8d
commit 9836bda502
7 changed files with 211 additions and 111 deletions

View File

@@ -372,7 +372,7 @@ function PLY.newDemoPlayer(id)
}
P:popNext()
end
function PLY.newRemotePlayer(id,mini,data)
function PLY.newRemotePlayer(id,mini,uid)
local P=newEmptyPlayer(id,mini)
P.type='remote'
P.update=PLY.update.remote_alive
@@ -382,11 +382,11 @@ function PLY.newRemotePlayer(id,mini,data)
P.stream={}
P.streamProgress=1
data.p=P
P.uid=data.uid
P.username=data.username
P.sid=data.sid
loadRemoteEnv(P,data.config)
netPLY.setPlayerObj(uid,P)
P.uid=uid
P.username=netPLY.getUsername(uid)
P.sid=netPLY.getSID(uid)
loadRemoteEnv(P,netPLY.getConfig(uid))
applyGameEnv(P)
end