修复不同设备对局sid不一致

This commit is contained in:
MrZ_26
2022-10-24 14:05:25 +08:00
parent 7953cf735b
commit b0acdce294
3 changed files with 7 additions and 6 deletions

View File

@@ -19,6 +19,7 @@ return{
GAME.modeEnv.task=marginTask
local L=TABLE.shift(NETPLY.list,0)
table.sort(L,function(a,b) return a.uid<b.uid end)
math.randomseed(GAME.seed)
for i=#L,1,-1 do
table.insert(NETPLY.list,table.remove(NETPLY.list,math.random(i)))
@@ -43,5 +44,8 @@ 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

@@ -660,7 +660,9 @@ function NET.wsCallBack.room_remove()
_playerLeaveRoom(USER.uid)
end
function NET.wsCallBack.player_updateConf(body)
NETPLY.map[body.data.playerId].config=body.data.config
if type(body.data)=='table' then
NETPLY.map[body.data.playerId].config=body.data.config
end
end
function NET.wsCallBack.player_finish(body)-- TODO
end

View File

@@ -139,11 +139,6 @@ function NETPLY.setStat(uid,S)
adpm=("%.1f %s"):format((S.atk+S.dig)/S.time*60,text.radarData[2]),
}
end
function NETPLY.resetState()
for i=1,#PLYlist do
PLYlist[i].playMode=0
end
end
local selP,mouseX,mouseY
function NETPLY.mouseMove(x,y)