From c47546d501be889d3f593a90a5e9cefeed126503 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Fri, 26 Nov 2021 00:55:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83=E4=B8=80=E4=BA=9B=E7=8E=A9?= =?UTF-8?q?=E5=AE=B6=E5=8A=A8=E4=BD=9C=E9=80=BB=E8=BE=91=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E9=9B=B6ARE+=E9=9D=9E=E9=9B=B6lineARE=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99ihs=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/player.lua | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/parts/player/player.lua b/parts/player/player.lua index 7fb94398..868021b4 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -258,21 +258,21 @@ function Player:act_moveRight(auto) end end function Player:act_rotRight() - if self.control and self.waiting==0 and self.cur then + if self.control and self.cur then self.ctrlCount=self.ctrlCount+1 self:spin(1) self.keyPressing[3]=false end end function Player:act_rotLeft() - if self.control and self.waiting==0 and self.cur then + if self.control and self.cur then self.ctrlCount=self.ctrlCount+1 self:spin(3) self.keyPressing[4]=false end end function Player:act_rot180() - if self.control and self.waiting==0 and self.cur then + if self.control and self.cur then self.ctrlCount=self.ctrlCount+2 self:spin(2) self.keyPressing[5]=false @@ -280,7 +280,7 @@ function Player:act_rot180() end function Player:act_hardDrop() local ENV=self.gameEnv - if self.control and self.waiting==0 and self.cur then + if self.control and self.cur then if self.lastPiece.autoLock and self.frameRun-self.lastPiece.frameself.ghoY then self.curY=self.curY-1 self:freshBlock('fresh') @@ -317,9 +317,10 @@ function Player:act_softDrop() end end function Player:act_hold() - if self.control and self.waiting==0 then - self:hold() - self.keyPressing[8]=false + if self.control and self.cur then + if self:hold()then + self.keyPressing[8]=false + end end end function Player:act_func1() @@ -1330,6 +1331,7 @@ function Player:hold(ifpre) elseif self.gameEnv.holdMode=='swap'then self:hold_swap(ifpre) end + return true end end @@ -2342,7 +2344,7 @@ local function update_alive(P) if P.movDir~=0 then local das,arr=ENV.das,ENV.arr local mov=P.moving - if P.waiting==0 then + if P.cur then if P.movDir==1 then if P.keyPressing[2]then if arr>0 then