Merge pull request #21 from Trixciel/master

Fixed ARE Cancelling when using a Sonic Drop RS
pull/24/head
Ishaan Bhardwaj 2021-06-07 23:12:58 -04:00 committed by GitHub
commit 929069c1b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -237,6 +237,7 @@ function GameMode:update(inputs, ruleset)
self.lock_on_soft_drop
then
self.piece.locked = true
self.piece_soft_locked = true
end
end
@ -417,9 +418,10 @@ function GameMode:dasCut()
end
function GameMode:areCancel(inputs, ruleset)
if ruleset.are_cancel and self.piece_hard_dropped and
if ruleset.are_cancel and strTrueValues(inputs) ~= "" and
not self.prev_inputs.up and
strTrueValues(inputs) ~= "" then
(self.piece_hard_dropped or
(self.piece_soft_locked and not self.prev_inputs.down)) then
self.lcd = 0
self.are = 0
end
@ -522,6 +524,7 @@ end
function GameMode:initializeNextPiece(inputs, ruleset, piece_data, generate_next_piece)
self.piece_hard_dropped = false
self.piece_soft_locked = false
local gravity = self:getGravity()
self.piece = ruleset:initializePiece(
inputs, piece_data, self.grid, gravity,