From 6b16fcd5f5a4b5f08a1dca85099d2902492a9cc8 Mon Sep 17 00:00:00 2001 From: MrZ_26 <1046101471@qq.com> Date: Fri, 28 Oct 2022 16:33:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E7=82=B9=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=EF=BC=8C=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/init.lua | 8 ++++---- parts/player/player.lua | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/parts/player/init.lua b/parts/player/init.lua index 78adfe7a..a8ea0f9d 100644 --- a/parts/player/init.lua +++ b/parts/player/init.lua @@ -381,7 +381,7 @@ local DemoEnv={ } function PLY.newDemoPlayer(id) local P=_newEmptyPlayer(id) - P.type='computer' + P.type='bot' P.sound=false P.demo=true @@ -410,7 +410,7 @@ function PLY.newRemotePlayer(id,mini,p) P.uid=p.uid P.sid=NET.uid_sid[p.uid] or p.uid P.group=p.group - P.netAtk=0 + P.netAtk=0-- Sum of lines sent in stream, will be compared with P.stat.send for checking stream legal or not if not (P.group%1==0 and P.group>=1 and P.group<=6) then P.group=0 end _loadRemoteEnv(P,p.config) @@ -418,13 +418,13 @@ function PLY.newRemotePlayer(id,mini,p) end function PLY.newAIPlayer(id,AIdata,mini,p) local P=_newEmptyPlayer(id,mini) - P.type='computer' + P.type='bot' local pData={ uid=id, group=0, } if p then TABLE.coverR(p,pData) end - P.username='BOT'..pData.uid + P.username="BOT"..pData.uid P.sid=NET.uid_sid[pData.uid] or pData.uid P.group=pData.group if not (P.group%1==0 and P.group>=1 and P.group<=6) then P.group=0 end diff --git a/parts/player/player.lua b/parts/player/player.lua index ff7c09c6..a0ccfd7a 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -2606,8 +2606,8 @@ local function update_streaming(P) for _,p in next,PLY_ALIVE do if p.sid==sid then P.netAtk=P.netAtk+amount - if P.netAtk~=P.stat.send then - MES.new('warn',"#"..P.uid..' desynchronized') + if P.netAtk~=P.stat.send then-- He cheated or just desynchronized to death + MES.new('warn',"#"..P.uid.." desynchronized") NET.player_finish({foo=""}) P:lose(true) return @@ -2681,7 +2681,7 @@ function Player:update(dt) self.trigFrame=self.trigFrame+dt*60 if self.alive then local S=self.stat - if self.type=='computer' then self.bot:update(dt) end + if self.type=='bot' then self.bot:update(dt) end if self.trigFrame>=1 and self.alive then if self.streamProgress then S.time=self.stat.frame/60