From 467c8f44d60dafcb21a793b0c8e81b651ac92a3e Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 23 Nov 2020 01:38:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E8=99=9A=E6=8B=9F=E6=8C=89?= =?UTF-8?q?=E9=94=AE=E5=8F=AF=E8=A7=81=E6=80=A7=E7=9A=84=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8Dmod=E4=B8=8D=E4=BC=9A=E5=BD=B1?= =?UTF-8?q?=E5=93=8D=E8=99=9A=E6=8B=9F=E6=8C=89=E9=94=AE=E7=9A=84=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/gametoolfunc.lua | 14 ++++---------- parts/player/gameEnv0.lua | 2 +- parts/player/init.lua | 4 ++++ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/parts/gametoolfunc.lua b/parts/gametoolfunc.lua index 593174e3..9e0eedad 100644 --- a/parts/gametoolfunc.lua +++ b/parts/gametoolfunc.lua @@ -56,15 +56,9 @@ function restoreVirtualKey() B.isDown=false B.pressTime=0 end - if not GAME.modeEnv.Fkey then - virtualkey[9].ava=false - end - if not GAME.modeEnv.holdCount or GAME.modeEnv.holdCount==0 then - virtualkey[8].ava=false - end - if GAME.modeEnv.keyCancel then - for _,v in next,GAME.modeEnv.keyCancel do - virtualkey[v].ava=false + for k,v in next,PLAYERS[1].keyAvailable do + if not v then + virtualkey[k].ava=false end end end @@ -467,8 +461,8 @@ function resetGameData(replaying) TASK.removeTask_code(TICK.autoPause) destroyPlayers() - restoreVirtualKey() GAME.curMode.load() + restoreVirtualKey() if GAME.modeEnv.task then for i=1,#PLAYERS do PLAYERS[i]:newTask(GAME.modeEnv.task) diff --git a/parts/player/gameEnv0.lua b/parts/player/gameEnv0.lua index 39126621..3eca518e 100644 --- a/parts/player/gameEnv0.lua +++ b/parts/player/gameEnv0.lua @@ -42,7 +42,7 @@ return{ visible="show", freshLimit=1e99,easyFresh=true, - Fkey=NULL, + Fkey=false, keyCancel={}, fine=false,fineKill=false, b2bKill=false, diff --git a/parts/player/init.lua b/parts/player/init.lua index 800cf4f6..bdbaff75 100644 --- a/parts/player/init.lua +++ b/parts/player/init.lua @@ -243,9 +243,13 @@ local function applyGameEnv(P)--Finish gameEnv processing end end end + if not ENV.Fkey then + P.keyAvailable[9]=false + end for _,v in next,ENV.keyCancel do P.keyAvailable[v]=false end + P:setInvisible( ENV.visible=="show"and -1 or ENV.visible=="time"and 300 or