Skip to content

Commit

Permalink
IHS is now autocancellable, and can save from incoming garbage
Browse files Browse the repository at this point in the history
  • Loading branch information
electraminer committed Oct 14, 2024
1 parent d2e4739 commit 941697c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions parts/player/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2456,7 +2456,15 @@ local function _updateMisc(P,dt)
-- Push up garbages
local y=P.fieldBeneath
if y>0 then
P.fieldBeneath=max(y-P.gameEnv.pushSpeed,0)
local newFieldBeneath = max(y-P.gameEnv.pushSpeed,0)

P.fieldBeneath = newFieldBeneath
-- If pushing up garbage will block IHS, then resolve IHS early
if P.bufferedIHS and P:willDieWith(P.holdQueue[1]) then
P.fieldBeneath = y
P:resolveIRS(P.fieldBeneath)
P.fieldBeneath = newFieldBeneath
end
end

-- Move camera
Expand Down Expand Up @@ -2556,13 +2564,13 @@ local function _updateFX(P,dt)
end

function Player:resolveIRS()
if self.bufferedIHS then
local pressing=self.keyPressing
if self.bufferedIHS and pressing[8] then
self:hold(true)
self.bufferedIHS = false
end
self.bufferedIHS=false

self.bufferedIRS = false
local pressing = self.keyPressing
if pressing[5] then
self:act_rot180()
elseif pressing[3] then
Expand Down
2 changes: 1 addition & 1 deletion version.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
return {
["apkCode"]=1722,
["code"]=1722,
["string"]="V0.17.22 + IRS",
["string"]="V0.17.22 + IRSv1.1",
["room"]="ver A-14",
["name"]="暂停 Break",
}

0 comments on commit 941697c

Please sign in to comment.