Upward kicks for SRS count toward rotation limit

This commit is contained in:
Ishaan Bhardwaj
2021-02-17 14:48:35 -05:00
parent 714c6b5e99
commit 31e2529265
4 changed files with 34 additions and 27 deletions

View File

@@ -92,11 +92,14 @@ function SRS:onPieceRotate(piece, grid)
piece.lock_delay = 0 -- rotate reset
self:checkNewLow(piece)
piece.manipulations = piece.manipulations + 1
if piece:isDropBlocked(grid) then
if piece.manipulations >= SRS.MANIPULATIONS_MAX then
piece.locked = true
end
end
if piece.manipulations >= self.MANIPULATIONS_MAX then
piece:moveInGrid({ x = 0, y = 1 }, 1, grid)
if piece:isDropBlocked(grid) then
piece.locked = true
end
end
end
function SRS:canPieceRotate() end
return SRS