修复联网小问题:退出房间检测不到,攻击信息来源读取错误
This commit is contained in:
@@ -328,20 +328,21 @@ function NET.updateWS_play()
|
||||
SCN.socketRead("Join",res.data)
|
||||
end
|
||||
elseif res.action==3 then--Player leave
|
||||
local d=res.data
|
||||
for i=1,#PLY_NET do
|
||||
if PLY_NET[i].uid==data.uid then
|
||||
if PLY_NET[i].uid==d.uid then
|
||||
rem(PLY_NET,i)
|
||||
break
|
||||
end
|
||||
end
|
||||
for i=1,#PLAYERS do
|
||||
if PLAYERS[i].userID==data.uid then
|
||||
if PLAYERS[i].userID==d.uid then
|
||||
rem(PLAYERS,i)
|
||||
break
|
||||
end
|
||||
end
|
||||
for i=1,#PLY_ALIVE do
|
||||
if PLY_ALIVE[i].userID==data.uid then
|
||||
if PLY_ALIVE[i].userID==d.uid then
|
||||
rem(PLY_ALIVE,i)
|
||||
break
|
||||
end
|
||||
|
||||
@@ -390,7 +390,7 @@ function update.remote_alive(P,dt)
|
||||
elseif event<=64 then--Release key
|
||||
P:releaseKey(event-32)
|
||||
elseif event>0x2000000000000 then--Sending lines
|
||||
local sid=tostring(event%0x100)
|
||||
local sid=event%0x100
|
||||
local amount=int(event/0x100)%0x100
|
||||
local time=int(event/0x10000)%0x10000
|
||||
local line=int(event/0x100000000)%0x10000
|
||||
|
||||
Reference in New Issue
Block a user