玩家死亡消息以服务器为准,录像不同步不再影响结算
This commit is contained in:
@@ -493,7 +493,13 @@ function NET.updateWS_stream()
|
||||
elseif res.action==3 then--Player leave
|
||||
--?
|
||||
elseif res.action==4 then--Player died
|
||||
--?
|
||||
local uid=res.data.uid
|
||||
for _,P in next,PLY_ALIVE do
|
||||
if P.uid==uid then
|
||||
P:lose(true)
|
||||
break
|
||||
end
|
||||
end
|
||||
elseif res.action==5 then--Receive stream
|
||||
SCN.socketRead("Stream",d)
|
||||
end
|
||||
|
||||
@@ -1724,6 +1724,7 @@ function Player:win(result)
|
||||
end
|
||||
function Player:lose(force)
|
||||
if self.result then return end
|
||||
if self.type=="remote"and not force then self.waiting=1e99 return end
|
||||
if self.life>0 and not force then
|
||||
self.waiting=62
|
||||
local h=#self.field
|
||||
|
||||
Reference in New Issue
Block a user