From f13c9792afb0827d404e3b324561741515f105ca Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Wed, 8 Dec 2021 08:40:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=8A=8A=E6=8C=89=E9=94=AE?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=B0=E5=BD=95=E5=83=8F=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E6=9C=BA=20=E4=BF=AE=E5=A4=8D=E8=A7=A6=E5=8F=91=E4=BA=86?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E4=BF=9D=E5=AD=98=E7=9A=84=E6=9C=80=E5=90=8E?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E6=8C=89=E9=94=AE=E6=9C=AC=E8=BA=AB=E4=B8=8D?= =?UTF-8?q?=E4=BC=9A=E4=BF=9D=E5=AD=98=E5=88=B0=E5=BD=95=E5=83=8F=E9=87=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/player.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/parts/player/player.lua b/parts/player/player.lua index 810e37ea..52eae105 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -494,6 +494,15 @@ local playerActions={ Player.act_zangiLeft, --19 Player.act_zangiRight,--20 }function Player:pressKey(keyID) + if self.id==1 then + if GAME.recording then + local L=GAME.rep + ins(L,self.frameRun) + ins(L,keyID) + elseif self.streamProgress then + VK.press(keyID) + end + end if self.keyAvailable[keyID]and self.alive then if self.waiting>self.gameEnv.hurry then self.waiting=self.gameEnv.hurry @@ -505,18 +514,8 @@ local playerActions={ playerActions[keyID](self) self.stat.key=self.stat.key+1 end - if self.id==1 then - if GAME.recording then - local L=GAME.rep - ins(L,self.frameRun) - ins(L,keyID) - elseif self.streamProgress then - VK.press(keyID) - end - end end function Player:releaseKey(keyID) - self.keyPressing[keyID]=false if self.id==1 then if GAME.recording then local L=GAME.rep @@ -526,6 +525,7 @@ function Player:releaseKey(keyID) VK.release(keyID) end end + self.keyPressing[keyID]=false end function Player:newTask(code,...) local thread=coroutine.create(code)