Skip to content

Commit

Permalink
修复swap模式hold和无限hold的冲突
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Sep 19, 2023
1 parent 6a4dfb4 commit 8df321b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions parts/player/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,8 @@ end
function Player:hold_swap(ifpre)
local ENV=self.gameEnv
local hid=ENV.holdCount-self.holdTime+1
print(ENV.holdCount,self.holdTime)
print(hid)
if self.nextQueue[hid] then
local C,H=self.cur,self.nextQueue[hid]
self.ctrlCount=0
Expand Down Expand Up @@ -1408,8 +1410,9 @@ function Player:hold_swap(ifpre)
end

self.freshTime=floor(min(self.freshTime+ENV.freshLimit*.25,ENV.freshLimit*((self.holdTime+1)/ENV.holdCount),ENV.freshLimit))
if not ENV.infHold then
self.holdTime=self.holdTime-1
self.holdTime=self.holdTime-1
if ENV.infHold and self.holdTime==0 then
self.holdTime=ENV.holdCount
end

if self.sound then
Expand Down

0 comments on commit 8df321b

Please sign in to comment.