优化联网游戏体验(统计数据结算、远程玩家死亡结算时机)

This commit is contained in:
MrZ_26
2022-10-28 16:33:19 +08:00
parent 6b16fcd5f5
commit e291a070f3
4 changed files with 21 additions and 5 deletions

View File

@@ -684,6 +684,7 @@ end
function NET.wsCallBack.player_finish(body)
for _,P in next,PLY_ALIVE do
if P.uid==body.data.playerId then
P.loseTimer=26
P:lose(true)
break
end
@@ -712,6 +713,9 @@ function NET.wsCallBack.player_setReadyMode(body)
NET.freshRoomAllReady()
end
function NET.wsCallBack.match_finish()
for _,P in next,PLAYERS do
NETPLY.setStat(P.uid,P.stat)
end
TASK.new(function()
TEST.yieldT(2.6)
TASK.unlock('netPlaying')