实现房间内排名(方法有点小神秘 不过应该能用

This commit is contained in:
MrZ_26
2022-11-03 22:45:46 +08:00
parent 43649c54a3
commit 89a5a718da
2 changed files with 8 additions and 1 deletions

View File

@@ -701,6 +701,7 @@ function NET.wsCallBack.player_finish(body)
if SCN.cur~='net_game' then return end
for _,P in next,PLY_ALIVE do
if P.uid==body.data.playerId then
NETPLY.setPlace(P.uid,#PLY_ALIVE)
P.loseTimer=26
P:lose(true)
break

View File

@@ -261,7 +261,13 @@ function scene.update(dt)
NETPLY.mouseMove(0,0)
for i=1,#NETPLY.list do
NETPLY.list[i].readyMode='Playing'
local p=NETPLY.list[i]
if p.playMode=='Gamer' then
p.readyMode='Playing'
p.place=1
else
p.place=1e99
end
end
NET.spectate=PLAYERS[1].uid~=USER.uid
if NET.storedStream then