From 97ca245dfcee10287d1c225f38bce25a5fe95c3f Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 2 Dec 2021 08:46:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=94=BE=E5=BD=95=E5=83=8F?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E8=99=9A=E6=8B=9F=E6=8C=89=E9=94=AE?= =?UTF-8?q?=E4=B8=8D=E4=BC=9A=E8=87=AA=E5=B7=B1=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/player.lua | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/parts/player/player.lua b/parts/player/player.lua index d1ebe844..f7454b76 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -504,19 +504,27 @@ local playerActions={ self.keyPressing[keyID]=true playerActions[keyID](self) self.stat.key=self.stat.key+1 - if self.id==1 and GAME.recording then + 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 and GAME.recording then - local L=GAME.rep - ins(L,self.frameRun) - ins(L,32+keyID) + if self.id==1 then + if GAME.recording then + local L=GAME.rep + ins(L,self.frameRun) + ins(L,32+keyID) + elseif self.streamProgress then + VK.release(keyID) + end end end function Player:newTask(code,...)