BONKERS handles rotate reset correctly now
parent
08287f4b04
commit
5b0d83b51c
|
@ -80,9 +80,13 @@ function ProGame:onHold()
|
||||||
end
|
end
|
||||||
|
|
||||||
function ProGame:whilePieceActive()
|
function ProGame:whilePieceActive()
|
||||||
self.piece.lock_delay = self.piece.lowest_y < self.piece.position.y
|
for _, block in pairs(self.piece:getBlockOffsets()) do
|
||||||
and 0 or self.piece.lock_delay
|
local y = self.piece.position.y + block.y
|
||||||
self.piece.lowest_y = math.max(self.piece.lowest_y, self.piece.position.y)
|
if y > self.piece.lowest_y then
|
||||||
|
self.piece.lock_delay = 0
|
||||||
|
self.piece.lowest_y = y
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function ProGame:onLineClear(cleared_row_count)
|
function ProGame:onLineClear(cleared_row_count)
|
||||||
|
|
|
@ -133,7 +133,6 @@ function BONKERS:attemptWallkicks(piece, new_piece, rot_dir, grid)
|
||||||
if grid:canPlacePiece(kicked_piece) then
|
if grid:canPlacePiece(kicked_piece) then
|
||||||
piece:setRelativeRotation(rot_dir)
|
piece:setRelativeRotation(rot_dir)
|
||||||
piece:setOffset(offset)
|
piece:setOffset(offset)
|
||||||
piece.lock_delay = 0 -- rotate reset
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue