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