From 3ef57cde2749ffdae883894392d5c7f02508b5c5 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 7 Jan 2021 18:03:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B8=B8=E6=88=8F=E7=BB=93?= =?UTF-8?q?=E6=9D=9F=E5=90=8E=E8=BF=98=E8=AE=A1=E7=AE=97=E6=8C=89=E9=94=AE?= =?UTF-8?q?=E6=AC=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parts/player/init.lua b/parts/player/init.lua index 6481629b..a3b5f800 100644 --- a/parts/player/init.lua +++ b/parts/player/init.lua @@ -33,7 +33,7 @@ local function getNewStatTable() return T end local function pressKey(P,keyID) - if P.keyAvailable[keyID]then + if P.keyAvailable[keyID]and P.alive then P.keyPressing[keyID]=true P.actList[keyID](P) if P.control then @@ -49,7 +49,7 @@ local function releaseKey(P,keyID) P.keyPressing[keyID]=false end local function pressKey_Rec(P,keyID) - if P.keyAvailable[keyID]then + if P.keyAvailable[keyID]and P.alive then ins(GAME.rep,GAME.frame+1) ins(GAME.rep,keyID) P.keyPressing[keyID]=true