From 112c7e5b86447f36f2d4bc0abd184af7c5b3386e Mon Sep 17 00:00:00 2001 From: Electra Date: Wed, 11 Dec 2024 23:29:49 -0500 Subject: [PATCH] Fixed IRS sound effects --- parts/player/player.lua | 32 +++++++++++++++----------------- version.lua | 2 +- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/parts/player/player.lua b/parts/player/player.lua index 07788bc92..0abbb835e 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -266,7 +266,7 @@ function Player:act_moveRight(auto) self.moving=0 end end -function Player:act_rotRight() +function Player:act_rotRight(ifpre) if not self.control then return end if self.cur then self.ctrlCount=self.ctrlCount+1 @@ -278,7 +278,7 @@ function Player:act_rotRight() self:resolveIRS() self.keyPressing[3] = true end - self:spin(1) + self:spin(1,ifpre) self:_triggerEvent('hook_rotate',1) -- Disable held inputs if IRS is off @@ -287,7 +287,7 @@ function Player:act_rotRight() end end end -function Player:act_rotLeft() +function Player:act_rotLeft(ifpre) if not self.control then return end if self.cur then self.ctrlCount=self.ctrlCount+1 @@ -299,7 +299,7 @@ function Player:act_rotLeft() self:resolveIRS() self.keyPressing[4] = true end - self:spin(3) + self:spin(3,ifpre) self:_triggerEvent('hook_rotate',3) -- Disable held inputs if IRS is off if not self.gameEnv.irs then @@ -307,7 +307,7 @@ function Player:act_rotLeft() end end end -function Player:act_rot180() +function Player:act_rot180(ifpre) if not self.control then return end if self.cur then self.ctrlCount=self.ctrlCount+2 @@ -319,7 +319,7 @@ function Player:act_rot180() self:resolveIRS() self.keyPressing[5] = true end - self:spin(2) + self:spin(2,ifpre) self:_triggerEvent('hook_rotate',2) -- Disable held inputs if IRS is off if not self.gameEnv.irs then @@ -1247,15 +1247,15 @@ function Player:resetBlock()-- Reset Block's position and execute I*S else -- If we're currently dying or in an entry-delay mode (20g), perform the rotation right away. if pressing[5] then - self:act_rot180() + self:act_rot180(true) elseif pressing[3] then if pressing[4] then - self:act_rot180() + self:act_rot180(true) else - self:act_rotRight() + self:act_rotRight(true) end elseif pressing[4] then - self:act_rotLeft() + self:act_rotLeft(true) end end -- Disable held inputs if IRS is off @@ -1308,9 +1308,7 @@ function Player:spin(d,ifpre) -- Fresh ghost and freshTime local t=self.freshTime - if not ifpre then - self:freshMoveBlock() - end + self:freshMoveBlock() if kickData[test][2]>0 and self.freshTime==t and self.curY~=self.imgY then self.freshTime=self.freshTime-1 end @@ -2572,15 +2570,15 @@ function Player:resolveIRS() self.bufferedIRS = false if pressing[5] then - self:act_rot180() + self:act_rot180(true) elseif pressing[3] then if pressing[4] then - self:act_rot180() + self:act_rot180(true) else - self:act_rotRight() + self:act_rotRight(true) end elseif pressing[4] then - self:act_rotLeft() + self:act_rotLeft(true) end end diff --git a/version.lua b/version.lua index 03f4e023d..d5b98ca10 100644 --- a/version.lua +++ b/version.lua @@ -1,7 +1,7 @@ return { ["apkCode"]=1722, ["code"]=1722, - ["string"]="V0.17.22 + IRSv1.1", + ["string"]="V0.17.22 + IRSv1.1.1", ["room"]="ver A-14", ["name"]="暂停 Break", }