From 80f2f0828385463e10c6f41dbe0aa774001fe5b6 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 14 Feb 2021 04:04:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E4=B8=AD=E9=80=94=E5=90=AF=E7=94=A8=E7=9A=84=E6=8C=89?= =?UTF-8?q?=E9=94=AE=E6=8C=89=E4=BA=86=E6=B2=A1=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/player.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/parts/player/player.lua b/parts/player/player.lua index 16b4cad2..5b5af514 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -169,9 +169,9 @@ function Player.movePosition(P,x,y,size) end function Player.switchKey(P,id,on) - if P.keyAvailable[id]and not on then + P.keyAvailable[id]=on + if not on then P:releaseKey(id) - P.keyAvailable[id]=false end if P.type=="human"then virtualkey[id].ava=on @@ -190,8 +190,7 @@ function Player.setHold(P,count)--Set hold count (false/true as 0/1) end P.gameEnv.holdCount=count P.holdTime=count - P:switchKey(8,count>0) - while P.holdQueue[count]do rem(P.holdQueue)end + while P.holdQueue[count+1]do rem(P.holdQueue)end end function Player.setNext(P,next,hidden)--Set next count (use hidden=true if set env.nextStartPos>1) P.gameEnv.nextCount=next