Fix the drop block lock rotation with SRS

This commit is contained in:
Ishaan Bhardwaj 2021-02-17 17:31:16 -05:00
parent 99b15803ee
commit 3947e9f02f
3 changed files with 9 additions and 0 deletions

View File

@ -25,6 +25,9 @@ function SRS:onPieceRotate(piece, grid, upward)
piece.lock_delay = 0 -- rotate reset piece.lock_delay = 0 -- rotate reset
if upward or piece:isDropBlocked(grid) then if upward or piece:isDropBlocked(grid) then
piece.manipulations = piece.manipulations + 1 piece.manipulations = piece.manipulations + 1
if piece:isDropBlocked(grid) then
piece.locked = true
end
end end
end end

View File

@ -93,6 +93,9 @@ function SRS:onPieceRotate(piece, grid, upward)
piece.lock_delay = 0 -- rotate reset piece.lock_delay = 0 -- rotate reset
if upward or piece:isDropBlocked(grid) then if upward or piece:isDropBlocked(grid) then
piece.rotations = piece.rotations + 1 piece.rotations = piece.rotations + 1
if piece:isDropBlocked(grid) then
piece.locked = true
end
end end
end end

View File

@ -186,6 +186,9 @@ function SRS:onPieceRotate(piece, grid, upward)
piece.lock_delay = 0 -- rotate reset piece.lock_delay = 0 -- rotate reset
if upward or piece:isDropBlocked(grid) then if upward or piece:isDropBlocked(grid) then
piece.rotations = piece.rotations + 1 piece.rotations = piece.rotations + 1
if piece:isDropBlocked(grid) then
piece.locked = true
end
end end
end end