From 0271b0501b399c100a185b908a83d6e66dde7eb0 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Wed, 7 Apr 2021 16:53:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=81=94=E7=BD=91=E5=B0=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=9A=E9=80=80=E5=87=BA=E6=88=BF=E9=97=B4?= =?UTF-8?q?=E6=A3=80=E6=B5=8B=E4=B8=8D=E5=88=B0=EF=BC=8C=E6=94=BB=E5=87=BB?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=9D=A5=E6=BA=90=E8=AF=BB=E5=8F=96=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/net.lua | 7 ++++--- parts/player/update.lua | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/parts/net.lua b/parts/net.lua index 0a35a405..46b8c23f 100644 --- a/parts/net.lua +++ b/parts/net.lua @@ -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 diff --git a/parts/player/update.lua b/parts/player/update.lua index 2e7048fc..dc4bd107 100644 --- a/parts/player/update.lua +++ b/parts/player/update.lua @@ -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